Does anyone else have a "Sense" board from the Open University? I have one, the OU created it to teach basic programming on their TU100 computing course and they re-wrote a version of Scratch to use with it.
It has an IR sensor, Temperature sensor, Motion sensor, 6 LED's, an IR emitter, light sensor and a step motor as well as a plug in 9V battery unit. It's about one and a half times the size of the Pi and I'm wondering about connecting the two together but don't have the electronics know-how to decide whether it's a good idea.
Does anyone have any ideas? Or does anyone know anything more or have a schematic of the Sense board?
Re: Open University "Sense" board and the Pi
I'm about to start that course in October. I take it you're on this course now? What is it like.
How is it connected to a normal PC?
How is it connected to a normal PC?
Re: Open University "Sense" board and the Pi
Hi, course is great fun and really interesting, I just finished it at the end of May, just missed out on a distinction! I'm studying for B67 degree "Computing and IT (Software developer) with Design as a second subject, I'm really enjoying it so far and have completed all my 1st year study, moving on to 2 Java programming courses from September and February which I'm hoping will lead me into programming commercially.
I would recommend TU100 to anyone, it's a really well organised introduction to all things IT, I've been a technician in Business to Business for about 14 years and after an accident left me disabled I thought I would study programming so that I can work from home.......so if anyone has any pointers on how to go about that any advice would be well received.
I'll post some photo's of the sense board some time over the next few days, it attaches to Mac, PC or Linux via a USB cable (which might be the simplest option for connecting to the Pi).
I would recommend TU100 to anyone, it's a really well organised introduction to all things IT, I've been a technician in Business to Business for about 14 years and after an accident left me disabled I thought I would study programming so that I can work from home.......so if anyone has any pointers on how to go about that any advice would be well received.
I'll post some photo's of the sense board some time over the next few days, it attaches to Mac, PC or Linux via a USB cable (which might be the simplest option for connecting to the Pi).
Re: Open University "Sense" board and the Pi
As it's connected via USB it would be very simple to port the Linux drivers, if the source is available. The beauty with Linux is that USB can be accessed from user space via libusb. So you can 'bake' your driver right into your code. An example of this is adb for Android development. Window users have to go look for drivers for their phones, Linux people just add a udev rule to give the current user access to the libusb file for the device and you're done. adb for Linux has the driver implemented in userspace.
I wish windows had this functionality for usb. No more DDK then.....
That is great news about the course, I've been a software developer for years and thought it's about time I did my degree. As I have so much experience it may not add to my hire ability, I'm doing it because the modules look really interesting.
I have had a couple of jobs working from home and it is as good as you could ever imagine. But the IT industry is a little slow on the take up of this. A lot of companies I have worked for think that to work as a team you need to be sat in the same room. Well from my experience that is so not true. One big company I would recommend perusing, it can be hard to get in, is Canonical the makers of Ubuntu. 70% of their staff work from home. They tend to hire people who have already contributed to the Linux course. So a first step would be to join the Linux foundation and get onto the Ubuntu forums and start to help out with parts of it that you think you can help with. Once you have a body of work you have done that has been helpful to the community, such as just answering questions on the forums or writing some great apps, you can then approach them throw their job site.

That is great news about the course, I've been a software developer for years and thought it's about time I did my degree. As I have so much experience it may not add to my hire ability, I'm doing it because the modules look really interesting.
I have had a couple of jobs working from home and it is as good as you could ever imagine. But the IT industry is a little slow on the take up of this. A lot of companies I have worked for think that to work as a team you need to be sat in the same room. Well from my experience that is so not true. One big company I would recommend perusing, it can be hard to get in, is Canonical the makers of Ubuntu. 70% of their staff work from home. They tend to hire people who have already contributed to the Linux course. So a first step would be to join the Linux foundation and get onto the Ubuntu forums and start to help out with parts of it that you think you can help with. Once you have a body of work you have done that has been helpful to the community, such as just answering questions on the forums or writing some great apps, you can then approach them throw their job site.
Re: Open University "Sense" board and the Pi
Hi Richard, thanks for your response, I will certainly start to try and contribute to the Linux community if it might give me some standing a bit later on. Like you I've been in the IT industry for years and despite MCP and small business specialist status, I've never had any formal qualifications, so when I was injured I decided it would be best to get my degree and use it to learn programming and try to find an in-road. I've also been looking tentatively at software testing, but I would much prefer to be a programmer.
Re: Open University "Sense" board and the Pi
We're working (slowly) on making the Senseboard-specific libraries available to things other than the Open University's Sense environment, probably via SWIG. We'll announce the libraries when they're done!
Re: Open University "Sense" board and the Pi
I'm trying to get Scratch to talk to external devices and this looks very interesting as its been ported for Windows and Linux 
I know nothing about such things but it'd would be great to get Sense working on a RPi and see if it would be the tool to control external hardware - can someone "convert" it to work on the Rpi- can I do it? (and where would I start??)
regards
Simon

I know nothing about such things but it'd would be great to get Sense working on a RPi and see if it would be the tool to control external hardware - can someone "convert" it to work on the Rpi- can I do it? (and where would I start??)

regards
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
http://cymplecy.wordpress.com/ @cymplecy on twitter
Re: Open University "Sense" board and the Pi
The OU haven't released a protocol document for the board, but the squeak source file is available on the OU website, so (while not trivial) it's possible to reverse engineer it to work out how to talk to it over USB.
We've actually been doing this to get the Sense board talking to Greenfoot, and now have a working implementation in Java in the form of a Greenfoot scenario.
It's not 100% stable at the moment (I blame the horrendously buggy RXTX libraries) but if you select the correct COM port in the SenseWorld class, it should fire up. Briefly tested on Windows and Linux, though not on the Pi yet (RXTX fiddling may well be needed as demonstrated here.).
In the process of doing so we also produced a protocol document which describes the protocol in full - it should be useful to anyone wanting to implement another library with the sense board. Once the protocol is known it's really not that hard to implement - pretty simple stuff just sending and receiving groups of bytes over a serial port (over USB.) You can grab it here, but please bear in mind it's not an official OU document, just what we've worked out from reverse engineering the Squeak code (so may contain inaccuracies accordingly.) If anyone does notice anything that's wrong, or has any questions, let me know and I'll try to help!
We've actually been doing this to get the Sense board talking to Greenfoot, and now have a working implementation in Java in the form of a Greenfoot scenario.
It's not 100% stable at the moment (I blame the horrendously buggy RXTX libraries) but if you select the correct COM port in the SenseWorld class, it should fire up. Briefly tested on Windows and Linux, though not on the Pi yet (RXTX fiddling may well be needed as demonstrated here.).
In the process of doing so we also produced a protocol document which describes the protocol in full - it should be useful to anyone wanting to implement another library with the sense board. Once the protocol is known it's really not that hard to implement - pretty simple stuff just sending and receiving groups of bytes over a serial port (over USB.) You can grab it here, but please bear in mind it's not an official OU document, just what we've worked out from reverse engineering the Squeak code (so may contain inaccuracies accordingly.) If anyone does notice anything that's wrong, or has any questions, let me know and I'll try to help!
Re: Open University "Sense" board and the Pi
What might be easier (to start with) is instead of trying to port the OU Linux version to RPi, just use normal Scratch as shipped with the RPi and make a Python buffer program to feed info to/from the SenseBoard.
This is what I use in my simple approach to talking to the GPIO pins - all (
) that is needed is to implement the serial protocol that @berry120 has published above.
regards
Simon
See here for my old ramblings
http://cymplecy.wordpress.com/2012/07/2 ... pberry_pi/
and where I'm up to now
http://cymplecy.wordpress.com/2012/08/2 ... spberrypi/
This is what I use in my simple approach to talking to the GPIO pins - all (

regards
Simon
See here for my old ramblings
http://cymplecy.wordpress.com/2012/07/2 ... pberry_pi/
and where I'm up to now
http://cymplecy.wordpress.com/2012/08/2 ... spberrypi/
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
http://cymplecy.wordpress.com/ @cymplecy on twitter
Re: Open University "Sense" board and the Pi
You could (possibly?) modify the board in theory to talk via GPIO, but that would be much more effort (for no good reason other than perhaps freeing a USB port - even then you can just use a hub) than just using it over USB.
Of course, unless you really want to there's no reason why it has to be Scratch you use to interface with the board; the protocol description attached above could be just as easily implemented in any other language of your choice.
Of course, unless you really want to there's no reason why it has to be Scratch you use to interface with the board; the protocol description attached above could be just as easily implemented in any other language of your choice.
Re: Open University "Sense" board and the Pi
I think you've misinterpreted my post - I'm suggesting using same method of using normal Scratch going through a Python handler that talks to the serial using the reverse engineered protocol - not trying to use the GPIOYou could (possibly?) modify the board in theory to talk via GPIO, but that would be much more effort (for no good reason other than perhaps freeing a USB port - even then you can just use a hub) than just using it over USB.

All anyone needs to do is replace my GPIO handling code with serial handling code

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
http://cymplecy.wordpress.com/ @cymplecy on twitter
Re: Open University "Sense" board and the Pi
Ah, gotcha. Yes, I was wondering what you were planning to do with the board to communicate over GPIO (visions of trying to solder cables to the FT232RL chip and run them to the Pi's inputs!)
That makes much more sense however
That makes much more sense however

Re: Open University "Sense" board and the Pi
Wow,
That TU100 digital life course is £2500 in Enland, or Finland where I happen to be now. Only £810 for those lucky people in Wales and such.
Has anyone done this course? How was it?
I was glued to the Open University broadcasts on TV in the 70s as a teenager and ever since have pondered taking a course or two for fun. But that is a lot of money.
That TU100 digital life course is £2500 in Enland, or Finland where I happen to be now. Only £810 for those lucky people in Wales and such.
Has anyone done this course? How was it?
I was glued to the Open University broadcasts on TV in the 70s as a teenager and ever since have pondered taking a course or two for fun. But that is a lot of money.
Memory in C++ is a leaky abstraction .
Re: Open University "Sense" board and the Pi
hi
sense is bug ridden and they know it, lecturers also know it yet they will still take your money. Stay clear of sense if you have any.
sense is bug ridden and they know it, lecturers also know it yet they will still take your money. Stay clear of sense if you have any.
-
- Posts: 52
- Joined: Sat Jan 21, 2012 2:15 pm
- Location: In a small English village, far from the eyes of Mordor
Re: Open University "Sense" board and the Pi
Hi, my friend has the Sense and he says it works great.. I may be buying it off him soon to use with my Raspberry Pi, which is exciting 
Has anyone actually got their Pi and Sense talking?
Thanks for any info!
Dave

Has anyone actually got their Pi and Sense talking?
Thanks for any info!
Dave
Arise! Arise, riders of Théoden! Spears shall be shaken, shields shall be splintered - a sword day, a red day, ere the sun rises! Ride now! Ride now! Ride! Ride to ruin, and the world's ending! Forth Éorlingas!
Re: Open University "Sense" board and the Pi
Heater:
We now have to rely on charity projects such as the rpi to make learning affordable in a developed country such as ours. This strikes me as a very sad state of affairs.
I did the TU100 last year in England for £770. It was the last year before the rates were jacked up to £2500 (thank you Mr Cameron). There is absolutely no way I would/could have done it at the current price and feel lucky to have got into university studying at the old rate by the skin of my teeth. I wonder how many others out there now feel priced out of studying, settling instead for a life of unskilled work...That TU100 digital life course is £2500 in Enland
We now have to rely on charity projects such as the rpi to make learning affordable in a developed country such as ours. This strikes me as a very sad state of affairs.
Re: Open University "Sense" board and the Pi
I have mu OU SenseBoard working on the RPi and running it with Sense programs.
It is fully explained how to set it up on the OU labspace website with a little Sense program that makes all the LEDs flick on and off.
http://labspace.open.ac.uk/mod/ouconten ... §ion=2
Saves you needing another sensor board as it has temperature, sound, a slider, a stepping motor a switch and an infra red LED that can all be programmed using Sense.
It is fully explained how to set it up on the OU labspace website with a little Sense program that makes all the LEDs flick on and off.
http://labspace.open.ac.uk/mod/ouconten ... §ion=2
Saves you needing another sensor board as it has temperature, sound, a slider, a stepping motor a switch and an infra red LED that can all be programmed using Sense.
Re: Open University "Sense" board and the Pi
The software may be - I honestly haven't tested it thoroughly, I spent the vast majority of the time looking at the source code! On the hardware side however, using the protocol document and sending raw bytes it appeared pretty stable to me - the only bug I found was to do with the stepper motor moving more than 128 steps, but there are workarounds to this (you have to group the steps in multiples of 128 and send them a couple of seconds apart until you're done.) That's a relatively easy workaround to produce in a library by doing some concurrent stuff in the background that the user doesn't need to know about.mawds wrote:hi
sense is bug ridden and they know it, lecturers also know it yet they will still take your money. Stay clear of sense if you have any.
Re: Open University "Sense" board and the Pi
Hi all,
I don't know how you all got on with getting your R-Pis and SenseBoards to talk, but I've just written a post about my foray in to it on my website, plus a bit of code showing how it's done.
If anyone is interested, the post is here: http://www.joshjohnson.edutechhosting.c ... lk-python/
BTW, berry120 your article was extremely helpful!
I don't know how you all got on with getting your R-Pis and SenseBoards to talk, but I've just written a post about my foray in to it on my website, plus a bit of code showing how it's done.
If anyone is interested, the post is here: http://www.joshjohnson.edutechhosting.c ... lk-python/
BTW, berry120 your article was extremely helpful!
Re: Open University "Sense" board and the Pi
Glad the article was useful for you! Sorry about the link - I'll get that fixed ASAP.
I too took stumbled across various other baud rates and settings in the code that didn't work - but yes, it appears there's at least partially complete code there for another similar board that operates with a different protocol, and distinguishing the two from each other was at times rather tricky!
You mention the fact that you had to send the bytes individually rather than as an array - I must admit this wasn't the case with Java and RXTX, and I suspect you're probably hitting cases where the buffer isn't being fully flushed rather than an array and individual bytes being handled differently (I could be completely wrong there though, my knowledge of Python is rather limited so it could just be handling the byte stream in a way that I'm not used to.)
Either way, glad it was useful and that you've managed to get something up and running with it - good work!
I too took stumbled across various other baud rates and settings in the code that didn't work - but yes, it appears there's at least partially complete code there for another similar board that operates with a different protocol, and distinguishing the two from each other was at times rather tricky!
You mention the fact that you had to send the bytes individually rather than as an array - I must admit this wasn't the case with Java and RXTX, and I suspect you're probably hitting cases where the buffer isn't being fully flushed rather than an array and individual bytes being handled differently (I could be completely wrong there though, my knowledge of Python is rather limited so it could just be handling the byte stream in a way that I'm not used to.)
Either way, glad it was useful and that you've managed to get something up and running with it - good work!
-
- Posts: 1
- Joined: Mon Jan 05, 2015 12:55 am
Re: Open University "Sense" board and the Pi
Hi Do any of you guys have the dvd or dvd's that came with this kit as my 9 year old daughter saw me looking TU100 up on Internet via TV and was interested in this so I have bought the lot brand new on ebay works greaþ but no dvd's do I really need them? Or is it all available to download? I have to say we are impressed with what we got for £21.25 inc p+p.
Cheers
Bill
Cheers
Bill
Re: Open University "Sense" board and the Pi
The Open University has an OpenLearn website with the SenseBoard software and instructions
- available free to everyone in the world!
http://www.open.edu/openlearnworks/mod/ ... d=22785%3F
- available free to everyone in the world!
http://www.open.edu/openlearnworks/mod/ ... d=22785%3F
Re: Open University "Sense" board and the Pi
I have an OU "Sense Board" which is working with my Raspberry Pi.
I have the following issues/questions.
1. When Sense scans for a USB port, it never finds one;
but if I tell it (via a "right-click" on the "watcher") to use "port 0" it works.
2. Once I get it working, it regularly drops out after a few hours,
with no obvious cause.
3. The instructions in "sense-configuration.txt" do not seem to be correct.
I will supply details on request.
4. Is it possible to modify "sense.sh" so as to tell the sense board which USB port to use?
5. Is it possible to get the sense board to start running a program
(which I am aware can be auto-loaded automatically)
without having to "click" on the green flag - or similar?
I have the following issues/questions.
1. When Sense scans for a USB port, it never finds one;
but if I tell it (via a "right-click" on the "watcher") to use "port 0" it works.
2. Once I get it working, it regularly drops out after a few hours,
with no obvious cause.
3. The instructions in "sense-configuration.txt" do not seem to be correct.
I will supply details on request.
4. Is it possible to modify "sense.sh" so as to tell the sense board which USB port to use?
5. Is it possible to get the sense board to start running a program
(which I am aware can be auto-loaded automatically)
without having to "click" on the green flag - or similar?
Re: Open University "Sense" board and the Pi
Here is a Python code I have written to interface with the OU Sense Board.
Code: Select all
#! /usr/bin/env python
#
# Code to interface with the OU Sense Board.
# author: Stephen C. Lovatt 30th Oct 2019
# Stephen.Lovatt-01@VirginMedia.com
# pharsea@yahoo.co.uk
import serial
import time
import io
import os
#
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate = 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
#
ser.flushInput()
ser.flushOutput()
print("**** INFO **** Serial Version is:")
print(serial.__version__)
print(" ")
print("**** INFO **** Serial Port is:")
print(ser.name)
print(" ")
#
print("**** INFO **** Sending reset")
ser.write('\x54')
ser.write('\xfe')
ser.write('\x10')
print("**** INFO **** Awaiting acknowledgement.")
while 1:
try:
if ( hex( ord( ser.read(1) ) ) == '0x55' ) :
if ( hex( ord( ser.read(1) ) ) == '0xff' ) :
if ( hex( ord( ser.read(1) ) ) == '0xaa' ) :
print("**** INFO **** Reset Command Acknowledged")
break
except KeyboardInterrupt:
print("**** INFO **** Closing connection with USB port.")
print(ser.name)
ser.close()
exit()
#
print("**** INFO **** turning all LEDs off")
ser.write('\x54')
ser.write('\xfe')
ser.write('\xc0')
ser.write('\x7f')
LED = 0
print("**** INFO **** Entering main loop")
Sensor = [ 0, 0, 0, 0, 0, 0, 0, 0 ]
NminusTwo = 0
NminusOne = 0
Async = 1
while 1:
try:
sync = ord( ser.read(1) )
if ( hex( sync ) == '0xc' ) :
FirstByte = bin( ord( ser.read(1) ) ).replace("0b","")
LeadingZeroes = 8 - len(FirstByte)
while LeadingZeroes > 0:
FirstByte = "0" + FirstByte
LeadingZeroes = LeadingZeroes - 1
if ( FirstByte == "00001100" ) : # 0xc
print ("**** INFO **** FirstByte = 0xc.")
#
# ....00..
# 01234567
Validate = FirstByte[4:6]
if ( Validate == "00" ) :
#
# XXXX....
# 01234567
N = int(FirstByte[0:4],2)
SecondByte = bin( ord( ser.read(1) ) ).replace("0b","")
if ( N == (NminusOne + 1)%8 and
N == (NminusTwo + 2)%8 ) :
LeadingZeroes = 8 - len(SecondByte)
while LeadingZeroes > 0:
SecondByte = "0" + SecondByte
LeadingZeroes = LeadingZeroes - 1
if ( SecondByte == "00001100" ) : # 0xc
print ("**** INFO **** SecondByte = 0xc.")
#
# ......XX
# 01234567
reading = int( FirstByte[6:8] + SecondByte , 2)
if ( N>0 and N<4 ) :
if ( reading < 128 ) :
reading = 0
else :
reading = 1
Sensor[N] = reading
if ( Async > 0 ) :
print ( "**** INFO **** Data Synchronised : {} , {} , {} = {}"
.format(NminusTwo,NminusOne,N,Async) )
print ( " The programme is running OK.")
print ( " Nothing more will be seen here")
print ( " unless something goes wrong.")
Async = 0
# print(Sensor)
if ( N == 7 ) :
MyFile=open("/home/pi/Conservatory/SenseBoard.OUT","w")
MyFile.write( "{} {} {} {} {} {} {} {}"
.format(Sensor[0],
Sensor[1],
Sensor[2],
Sensor[3],
Sensor[4],
Sensor[5],
Sensor[6],
Sensor[7]) )
MyFile.close()
else :
print ("**** WARN **** Data Out of Sync : {} , {} , {} = {}"
.format(NminusTwo,NminusOne,N,Async) )
NminusTwo = N - 1
NminusOne = N
else :
print ( "**** WARN **** Validation bits are not null: "+Validate )
else :
if ( hex( sync ) == '0x55' ) :
if ( hex( ord( ser.read(1) ) ) == '0xff' ) :
if ( hex( ord( ser.read(1) ) ) == '0xaa' ) :
# print("**** INFO **** LED Command Acknowledged")
ser.write('\x54')
ser.write('\xfe')
if ( LED >0 ) :
# print("**** INFO **** turning all LEDs off")
ser.write('\xc0')
ser.write('\x7f')
LED = 0
else :
j = 0
while j < 1000 :
if os.path.exists("/home/pi/Conservatory/SenseBoard.LED"):
MyFile = open("/home/pi/Conservatory/SenseBoard.LED","r")
LEDstatus = MyFile.readline()
MyFile.close()
break
else:
j = j + 1
if ( j > 900 ) :
print("**** ERROR **** The file 'SenseBoard.LED' does not exist.")
LEDascii = chr( int('0b'+LEDstatus,2) )
# print("**** INFO **** turning LEDs on." , LEDstatus, LEDascii )
ser.write('\xc1')
ser.write(LEDascii)
LED = 1
time.sleep(2)
# print("**** INFO **** Awaiting acknowledgement.")
else :
Async = Async + 1
if (Async > 8 ) :
print ("**** ERROR **** Sychronization Failure.")
ser.close()
exit()
else :
print ("**** WARN **** Async = {}.".format(Async))
except KeyboardInterrupt:
print("**** INFO **** Closing connection with USB port.")
print(ser.name)
ser.close()
exit()
Re: Open University "Sense" board and the Pi
Whoa! SenseBoard - I remember that being a thing just as the Raspberry Pi came out. It even got a writeup in the blog: SenseBoard - Raspberry Pi. Almost everything about it has disappeared from the web, though. Even the board and firmware files, which is a shame. The project's pretty much dead, and OU don't support it.
Though I don't have one, I know it's basically a shield on top of an Arduino. TBH, the most useful thing anyone could do for posterity is document which sensor/output is connected to what Arduino port so people could write their own sketches for the board, or modify it to use a standard protocol like Firmata.
Though I don't have one, I know it's basically a shield on top of an Arduino. TBH, the most useful thing anyone could do for posterity is document which sensor/output is connected to what Arduino port so people could write their own sketches for the board, or modify it to use a standard protocol like Firmata.
Dodgy serial port scanning: the bane of Arduino setups everywhere.
It's probably not reading the serial port properly. Also, if the underlying Arduino on the SenseBoard is like the one on a Leonardo, they do have serial issues that cause them to hang after a while. The only cure for that is frequent resets.2. Once I get it working, it regularly drops out after a few hours,
with no obvious cause.
No (it only initialises the main GUI) but there looks like there are scanning settings you can change in the ini file. Then again, that might be one of the problems you mention in the settings doc ...4. Is it possible to modify "sense.sh" so as to tell the sense board which USB port to use?
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him