background image

 

 

9    

 InO

-B

o

Te

ac

her

 G

ui

de

 -

 Scr

at

ch

 

Key Focus 5 – Avoid obstacles 

  
On the front of InO-Bot there is an ultrasonic range 
finder. This is a sensor that reports values from 0 to 
255. The values are reported in centimetres and 
indicate how far an object is from the front of the 
sensor. InO-Bot can be programmed to move around 
and when the range finder reports an obstacle at a 
given distance in front it can back up and turn. 
 
The ‘Movement Complete’ block is defined to allow 
movements to be completed before the next 
command is issued. This block is there when the TTS 
Scratch Launcher runs. If the block isn’t available, it 
can be recreated by dragging the same blocks 
together, as shown. 
 
The ‘when q key is pressed’ set of blocks is created as 
an emergency stop. Pressing q will quickly stop InO-
Bot moving. 
 
The ‘when x key pressed’ set of blocks is the main 
program and InO-Bot is set to start moving forward. 
The ‘wait’ command ensures this movement starts 
before more commands are sent. The ‘forever’ loop 
then contains a conditional check. If the distance 
sensor reports an object less than 20cm in front, the 
program makes InO-Bot reverse, turn and then start 
moving forward again. 
 
There is a sound added (‘Play sound9’) to indicate when an object is detected. The 
additional wait ensures commands run. 
 
Children should experiment with the commands above and spend time working out the 
optimum trigger distance. Should it be more or less than 20cm? There may be some 
discussion around the trigger point. Does InO-Bot react at exactly 20cm? If not, why 
not? Often it will be a little less and this is due to reaction time, i.e. the sensor sends 
data back to the PC, Scratch then needs to read that data and send commands to 
make InO-Bot do something else. Data needs to be sent back and forth. Although this 
data transmission is speedy there is still some lag. Are children able to modify their 
program to address this? For example, they may put 25cm when they want InO-Bot to 
stop at 20cm. 
 

Содержание InO-Bot Scratch

Страница 1: ...1 InO Bot Teacher Guide Scratch www tts shopping com Teacher Guide Scratch Product Code EL00483 InO Bot...

Страница 2: ...s 4 Automatic headlights 8 Key Focus 5 Avoid obstacles 9 Key Focus 6 Responding to sound 10 Getting Started with InO Bot and Scratch on Windows 11 InO Bot Bluetooth Connection 11 Windows 7 Bluetooth C...

Страница 3: ...ing references listed below are indicative of some aspects of the curriculum the activities cover They are not an exhaustive list nor do they indicate that one activity fully covers that curriculum ar...

Страница 4: ...of repetition will allow this activity to be developed Children can explore lighting the LEDs in different orders to create alternative patterns The example right could be seen as an emergency vehicle...

Страница 5: ...d to be increased or decreased by a degree or two The accuracy of movement may also be affected by the type of surface InO Bot moves over The example program shown above works but isn t very efficient...

Страница 6: ...variable In the Data section of Scratch choose Make a Variable Call it note The set of blocks shown right mean that pressing the up arrow on the keyboard adds 1 to the variable note and then plays tha...

Страница 7: ...7 2f 28 2g 29 3a It is important to have the wait blocks in place as these set the pauses between notes These pauses could actually be created as a variable This would mean the pause duration could be...

Страница 8: ...he example on the right shows a conditional statement If then else block in use If the value from the light sensor is less the 25 then turn the front lights on If it s not less than 25 25 or more else...

Страница 9: ...t moving forward The wait command ensures this movement starts before more commands are sent The forever loop then contains a conditional check If the distance sensor reports an object less than 20cm...

Страница 10: ...else turn them off If it rises above 20 then turn the next row of LEDs on else turn them off Because both conditional checks are in the same loop both can be true at the same time and therefore the fi...

Страница 11: ...tch2download 2 Download and install the TTS Scratch Launcher from the supporting material section of this page http www tts group co uk ino bot scratch programmable bluetooth floor robot 1009821 html...

Страница 12: ...ick on this message or icon to view the driver installation progress shown below 8 Windows will automatically install the required drivers 9 Once the drivers are installed the message below will be sh...

Страница 13: ...nge and a list of available Bluetooth devices will be shown 5 Click on the headphone icon by InO Bot and then click on Pair 6 Once paired a Connect message will be displayed 7 The Bluetooth connection...

Страница 14: ...ck on Add a Bluetooth Device 4 Click on the headphone icon by InO Bot Ignore the tablet phone icon 5 An option to pair should appear Click on the Pair button 6 Once the pairing completes the Connected...

Страница 15: ...or Advanced box underneath the InO Bot icon Basic is a more limited set of Scratch Blocks for InO Bot and Advanced contains all blocks available for InO Bot Click on Start Scratch 4 Scratch will open...

Страница 16: ...16 InO Bot Teacher Guide Scratch 7 InO Bot can then be used with Scratch Additional blocks to control InO Bot are available in More Blocks...

Страница 17: ...ull brightness 1 127 Moves forwards the stated distance and given speed slow medium or fast 1 127 Moves backwards the stated distance and given speed slow medium or fast Switches the motors on forward...

Страница 18: ...The commands and sensors below are available in addition to the Basic blocks listed above Command Values Description 0 255 Sets the top LEDs a given colour using red green and blue values 1 8 and 0 2...

Страница 19: ...1 1g 5 6 15 f 22 2a 6 7 16 g 23 2b 7 8 24 2c 8 9 25 2d 9 10 26 2e 27 2f 28 2g 29 3a Technical Support Please visit www tts group co uk for the latest product information Email feedback tts group co uk...

Отзывы: