Users Manual

SCRATCH CODING KIT
Coding ‘If’ with the alligator robot
If we controlled the brightness sensor’s servo motor with the ‘if..or else..’ phrase before, we are going to use two
‘if’ phrases to control the servo motor. First, make a script that will close the alligator’s mouth when the brightness
sensor’s value is big (when the sensor is covered).
The script above makes the alligator close its mouth when the brightness sensor’s value is big. Let’s see how the
servo motor will work when the brightness sensor’s value is small. Make the script below.
The whole script can be found at http://www.robotori.com/web_eng -> Moretips -> Manual ->EDU ->Logic
boost CODING CLASS 2 ->download whole script
Did you make the script? The script above opens the mouth in an angle which was set by the volume sensor when
the value of the brightness sensor is small. Now, combine these two scripts, and it will look like below! Start the
script, and if it doesn’t work well, try making it again slowly. It’s easy if you think you are dividing ‘If..or else..’ into
two parts.
Experiencing
the alligator robot coding