Notes for Ohbot2 Owners
20th December 2015
Acrylic
For the remaining bits of acrylic - the mouth and the top of the neck - the acrylic is strong but quite brittle. If you drop it you can knock bits off. You can glue it back together with glue or stick it with Sugru. If it’s a really bad smash then let us know and we’ll see if we can dig out a spare bit. The base, cheeks and eyes are made from much tougher material.
Windows versions
Ohbot2 software works with Windows 7, Windows 8 and Windows 10.
Installation and Licencing
As Ohbot software can be used without an Ohbot in simulation mode we need to limit it to restrict it from being copied everywhere. On the other hand we know that you will be working in groups and not all computers will have an Ohbot attached.
We have resolved this by granting four licences for each Ohbot that you buy. We request your email address the first time you run Ohbot software.
We hope that this gives a good balance. When we update the software you may have to reauthorize it. You may also have to reauthorize if you change your computer hardware.
Programs
Programs are read from and written to a folder called Ohbot in libraries\documents. You can navigate to other places in file explorer if you like but explorer will always default back to this folder. They are standalone files so they can be emailed or copied. They are human readable but not very easy to understand. There’s also a file in there called motordefinitions.omd which is where your motor settings are saved to. It’s a good idea to take a backup of libraries\documents\ohbot once in a while.
Text to Speech
For the Speech commands Ohbot will use whatever voice is selected in the Windows Text to Speech setting. Search on “Voice” in Windows Control Panel to find how to change this including how to make Ohbot talk slower or quicker.
You get a single voice with Windows 7 although it seems to make a difference if you have 32 bit or 64 bit Windows installed. Windows 8 has two voices. You get an American voice by installing the US language pack.
We’re not sure what the deal is with European voice support. We think that it should be built into Windows but reports so far indicate that it isn’t.
You can buy voices including European languages, Welsh, Gaelic and various accents from:
Ivona https://www.ivona.com/us/about-us/voice-portfolio/
Cereproc https://www.cereproc.com/en/products/windows_sapi
Cereproc advertises that it supplies a Scottish English voice called Heather free to all Scottish schools.
Ivona advertises that it supplies a male and female Welsh voice free in the UK in partnership with RNIB.
Speech Recognition
For the When Word Heard event Ohbot makes use of whatever speech recognition has been set up in Windows. In particular you need to check microphone configuration in order to get speech recognition to work – speech recognition uses the default audio input device so you need to check that this is set to your microphone by searching on sound recording in control panel.
You can select Sensors from the Settings menu in the Ohbot program to choose whether to use a small vocabulary or standard vocabulary. Using a small vocabulary is much more accurate. If you choose small vocabulary you can set the words that Ohbot will try to recognize on the form – separate the individual words with commas.
You could try training the default speech profile through the options in control panel to improve the accuracy on the standard vocabulary but we haven’t tried this.
You can define Speech Locale on the sensors screen from the settings menu but we’ve never been able to get it to work on anything other than en-US.
You can also turn speech recognition off on the sensors screen from the settings menu.
Loudness
The loudness block uses the speech recognition library so, if speech is turned off, it will not produce any values.
Sound
Sounds are read from a folder called Ohbot in libraries\music. Only .wav files are supported. You can copy .wav files to that folder to get more choices in Ohbot.
Camera
For the Camera X, Camera Y, Camera Colour, Faces Detected and Face Size blocks sensing blocks you need to have a camera attached to the computer. You can select the camera that you are using from the ones that are available by selecting Sensors from the Settings menu in the Ohbot program. A high resolution will be slower to process but will give more accurate face recognition.
Face Detect Type
Single - Will stop after finding the first face
No Overlap - If a face is found the area that it’s in will not be scanned again for a second image
Average - If several objects are detected inside each other they will be averaged.
Face Detect Suppression
If you’re using Average and an object has not been detected this many times then reject it. Normally use values between 1 and 6
You can turn the camera off on the Sensors screen from the Settings menu.
Weather Code
The Weather and Temperature sensor blocks get information from the Yahoo weather service. You can set the code for your location in the Weather code box by selecting Sensors from the Settings menu. The code comes from
http://www.weather.com/weather/today/l/UKEN0320:1:UK then type your location into the search top right and read the code from the bit of the top bar that’s marked in red above.
Weather comes back as a number:
public const int WeatherUnusual = 0;
public const int WeatherSnow = 1;
public const int WeatherRain = 2;
public const int WeatherCloud = 3;
public const int WeatherSun = 4;
Minutes to Sleep
Ohbot will go to sleep to stop the motors wearing out when nothing is happening. This is set in the Minutes to Sleep box by selecting Sensors from the Settings menu. It defaults to 3 minutes.
Motors screen
This screen is displayed from the Settings Menu. It’s where the limits, direction, speed and acceleration of the motors are set up. Please be really careful changing these as they have been set up through trial and error and lots of testing. You can click the Motors On check box at the bottom left to turn the motors on and then move the sliders to test moving motors individually. When a program is running this screen will display the motor positions. We’ve put a password lock on this screen to stop children from accessing it. The password is Einstein or ctrl alt E.
Software errors – status bar and debug tab
We hope this doesn’t happen but if you get an internal error in the software you will see a red prompt on the status bar. If you switch to the debug tab you will see the full text of the error. You can copy this to the clipboard using the Copy Debug button and paste it into an email to send it to us.
All errors are also written to libraries\documents\ohboterror.log so you can email this to us.
Missing Scratch blocks
We’ve implemented most of the blocks in Scratch plus many of our own but if you are missing any please let us know.
Code
Just for interest the Ohbot code is written in C# using Visual Studio 2012 and XAML forms.
The simulation is done using the ViewPort3D library with parts drawn in the CAD4U application and extruded in the Blender application then saved as 3ds files.
The 3ds files are loaded into the Viewport when the program starts up and manipulated using the Helix extension library. They are positioned and animated manually in code.
Camera handling and face recognition uses the AForge and Accord extension libraries.
Text to speech and speech recognition use the Microsoft speech libraries.
The Pololu board interface is via Pololu’s Usc and UsbWrapper libraries. The Arduino interface is through the serial port.
Arduino
Ohbot2 uses an Arduino controller. We supply the controller with our driver software ready installed but you can reload the Open Source Ohbot Arduino controller if you need to. How to do this is explained in this document:
https://www.dropbox.com/s/95pq53w4imarpim/OhbotArduino.doc?dl=0
This document also gives information about how to control Ohbot from other environments through the serial port.
Language Translation
Version 1.0.0.35 of Ohbot software and later can be translated to different languages. There’s information about how to do this here:
http://www.ohbot.co.uk/language-translation.html
Simulation
You can move the simulation around within the simulation window by holding control key down and pressing various keys. This is deliberately not documented as it’s quite easy to “lose” the simulation.
Ctrl F1 - Camera X position +10
Ctrl F2 - Camera X position -10
Ctrl F3 - Camera Y position +10
Ctrl F4 - Camera Y position -10
Ctrl F5 - Camera Z position +10
Ctrl F6 - Camera Z position -10
Ctrl F7 - Camera Field of View +5
Ctrl F8 - Camera Field of View -5
Ctrl Left Arrow - LookDirection X -0.1
Ctrl Right Arrow - LookDirection X +0.1
Ctrl Up Arrow - LookDirection Y -0.1
Ctrl Down Arrow - LookDirection Y +0.1
Ctrl Page Up - LookDirection Z -0.1
Ctrl Page Down - LookDirection Z +0.1
Ctrl F9 - Toggle full screen simulation
Ctrl F11 - Reset to defaults (like the hyperspace button on asteroids!)
Ctrl F12 - Save the current view settings
Webservice Calls
Version 1.28 of Ohbot software adds a generic webservice which can be extended to call out to a webservice with a parameter passed from inside an Ohbot script and to pick up a return from the webservice to assign to a variable or use in speech.
The webservices are defined in an xml file in the Ohbot folder of Libraries\Documents. The definition file is called webcalldefinitions.owd.
Each entry in the file defines:
Name - The name that identifies the webservice to use in the Ohbot script
URL - The URL to call for the webservice including a {0} marker which will be replaced by any parameters
Format - The format of the data that’s returned – json or xml
Property - The name of the property that holds the data that’s returned
The example that’s provided calls wikipedia extracts with this url:
https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=robot
Note that in the file each & character is expanded to &
You can put this URL into a browser to see an example of the data that’s returned.
An example Ohbot script to call this is:
20th December 2015
Acrylic
For the remaining bits of acrylic - the mouth and the top of the neck - the acrylic is strong but quite brittle. If you drop it you can knock bits off. You can glue it back together with glue or stick it with Sugru. If it’s a really bad smash then let us know and we’ll see if we can dig out a spare bit. The base, cheeks and eyes are made from much tougher material.
Windows versions
Ohbot2 software works with Windows 7, Windows 8 and Windows 10.
Installation and Licencing
As Ohbot software can be used without an Ohbot in simulation mode we need to limit it to restrict it from being copied everywhere. On the other hand we know that you will be working in groups and not all computers will have an Ohbot attached.
We have resolved this by granting four licences for each Ohbot that you buy. We request your email address the first time you run Ohbot software.
We hope that this gives a good balance. When we update the software you may have to reauthorize it. You may also have to reauthorize if you change your computer hardware.
Programs
Programs are read from and written to a folder called Ohbot in libraries\documents. You can navigate to other places in file explorer if you like but explorer will always default back to this folder. They are standalone files so they can be emailed or copied. They are human readable but not very easy to understand. There’s also a file in there called motordefinitions.omd which is where your motor settings are saved to. It’s a good idea to take a backup of libraries\documents\ohbot once in a while.
Text to Speech
For the Speech commands Ohbot will use whatever voice is selected in the Windows Text to Speech setting. Search on “Voice” in Windows Control Panel to find how to change this including how to make Ohbot talk slower or quicker.
You get a single voice with Windows 7 although it seems to make a difference if you have 32 bit or 64 bit Windows installed. Windows 8 has two voices. You get an American voice by installing the US language pack.
We’re not sure what the deal is with European voice support. We think that it should be built into Windows but reports so far indicate that it isn’t.
You can buy voices including European languages, Welsh, Gaelic and various accents from:
Ivona https://www.ivona.com/us/about-us/voice-portfolio/
Cereproc https://www.cereproc.com/en/products/windows_sapi
Cereproc advertises that it supplies a Scottish English voice called Heather free to all Scottish schools.
Ivona advertises that it supplies a male and female Welsh voice free in the UK in partnership with RNIB.
Speech Recognition
For the When Word Heard event Ohbot makes use of whatever speech recognition has been set up in Windows. In particular you need to check microphone configuration in order to get speech recognition to work – speech recognition uses the default audio input device so you need to check that this is set to your microphone by searching on sound recording in control panel.
You can select Sensors from the Settings menu in the Ohbot program to choose whether to use a small vocabulary or standard vocabulary. Using a small vocabulary is much more accurate. If you choose small vocabulary you can set the words that Ohbot will try to recognize on the form – separate the individual words with commas.
You could try training the default speech profile through the options in control panel to improve the accuracy on the standard vocabulary but we haven’t tried this.
You can define Speech Locale on the sensors screen from the settings menu but we’ve never been able to get it to work on anything other than en-US.
You can also turn speech recognition off on the sensors screen from the settings menu.
Loudness
The loudness block uses the speech recognition library so, if speech is turned off, it will not produce any values.
Sound
Sounds are read from a folder called Ohbot in libraries\music. Only .wav files are supported. You can copy .wav files to that folder to get more choices in Ohbot.
Camera
For the Camera X, Camera Y, Camera Colour, Faces Detected and Face Size blocks sensing blocks you need to have a camera attached to the computer. You can select the camera that you are using from the ones that are available by selecting Sensors from the Settings menu in the Ohbot program. A high resolution will be slower to process but will give more accurate face recognition.
Face Detect Type
Single - Will stop after finding the first face
No Overlap - If a face is found the area that it’s in will not be scanned again for a second image
Average - If several objects are detected inside each other they will be averaged.
Face Detect Suppression
If you’re using Average and an object has not been detected this many times then reject it. Normally use values between 1 and 6
You can turn the camera off on the Sensors screen from the Settings menu.
Weather Code
The Weather and Temperature sensor blocks get information from the Yahoo weather service. You can set the code for your location in the Weather code box by selecting Sensors from the Settings menu. The code comes from
http://www.weather.com/weather/today/l/UKEN0320:1:UK then type your location into the search top right and read the code from the bit of the top bar that’s marked in red above.
Weather comes back as a number:
public const int WeatherUnusual = 0;
public const int WeatherSnow = 1;
public const int WeatherRain = 2;
public const int WeatherCloud = 3;
public const int WeatherSun = 4;
Minutes to Sleep
Ohbot will go to sleep to stop the motors wearing out when nothing is happening. This is set in the Minutes to Sleep box by selecting Sensors from the Settings menu. It defaults to 3 minutes.
Motors screen
This screen is displayed from the Settings Menu. It’s where the limits, direction, speed and acceleration of the motors are set up. Please be really careful changing these as they have been set up through trial and error and lots of testing. You can click the Motors On check box at the bottom left to turn the motors on and then move the sliders to test moving motors individually. When a program is running this screen will display the motor positions. We’ve put a password lock on this screen to stop children from accessing it. The password is Einstein or ctrl alt E.
Software errors – status bar and debug tab
We hope this doesn’t happen but if you get an internal error in the software you will see a red prompt on the status bar. If you switch to the debug tab you will see the full text of the error. You can copy this to the clipboard using the Copy Debug button and paste it into an email to send it to us.
All errors are also written to libraries\documents\ohboterror.log so you can email this to us.
Missing Scratch blocks
We’ve implemented most of the blocks in Scratch plus many of our own but if you are missing any please let us know.
Code
Just for interest the Ohbot code is written in C# using Visual Studio 2012 and XAML forms.
The simulation is done using the ViewPort3D library with parts drawn in the CAD4U application and extruded in the Blender application then saved as 3ds files.
The 3ds files are loaded into the Viewport when the program starts up and manipulated using the Helix extension library. They are positioned and animated manually in code.
Camera handling and face recognition uses the AForge and Accord extension libraries.
Text to speech and speech recognition use the Microsoft speech libraries.
The Pololu board interface is via Pololu’s Usc and UsbWrapper libraries. The Arduino interface is through the serial port.
Arduino
Ohbot2 uses an Arduino controller. We supply the controller with our driver software ready installed but you can reload the Open Source Ohbot Arduino controller if you need to. How to do this is explained in this document:
https://www.dropbox.com/s/95pq53w4imarpim/OhbotArduino.doc?dl=0
This document also gives information about how to control Ohbot from other environments through the serial port.
Language Translation
Version 1.0.0.35 of Ohbot software and later can be translated to different languages. There’s information about how to do this here:
http://www.ohbot.co.uk/language-translation.html
Simulation
You can move the simulation around within the simulation window by holding control key down and pressing various keys. This is deliberately not documented as it’s quite easy to “lose” the simulation.
Ctrl F1 - Camera X position +10
Ctrl F2 - Camera X position -10
Ctrl F3 - Camera Y position +10
Ctrl F4 - Camera Y position -10
Ctrl F5 - Camera Z position +10
Ctrl F6 - Camera Z position -10
Ctrl F7 - Camera Field of View +5
Ctrl F8 - Camera Field of View -5
Ctrl Left Arrow - LookDirection X -0.1
Ctrl Right Arrow - LookDirection X +0.1
Ctrl Up Arrow - LookDirection Y -0.1
Ctrl Down Arrow - LookDirection Y +0.1
Ctrl Page Up - LookDirection Z -0.1
Ctrl Page Down - LookDirection Z +0.1
Ctrl F9 - Toggle full screen simulation
Ctrl F11 - Reset to defaults (like the hyperspace button on asteroids!)
Ctrl F12 - Save the current view settings
Webservice Calls
Version 1.28 of Ohbot software adds a generic webservice which can be extended to call out to a webservice with a parameter passed from inside an Ohbot script and to pick up a return from the webservice to assign to a variable or use in speech.
The webservices are defined in an xml file in the Ohbot folder of Libraries\Documents. The definition file is called webcalldefinitions.owd.
Each entry in the file defines:
Name - The name that identifies the webservice to use in the Ohbot script
URL - The URL to call for the webservice including a {0} marker which will be replaced by any parameters
Format - The format of the data that’s returned – json or xml
Property - The name of the property that holds the data that’s returned
The example that’s provided calls wikipedia extracts with this url:
https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=robot
Note that in the file each & character is expanded to &
You can put this URL into a browser to see an example of the data that’s returned.
An example Ohbot script to call this is: