Users Manual

CLASS 2
134
Experiencing the
alligator robot coding
Sound sensor and opening the alligator’s mouth
First, code an explanation of the settings of the alligator in the beginning. When the script starts, the sound sen-
sor should start playing music and the servo motor has to open the robot’s mouth. Remember what we learned
before and make a script.
Look at the script below.
Check out the script above! When the script starts, the servo motor will open the robot’s mouth and the sound
sensor will play its music for 2.5 seconds. This was the code for the alligator’s basic position before doing anything.
It’s really simple, but it’s important to set a beginning position for robots when coding.
Carefully set the angle at which the
alligator opens its mouth.
It might be different depending on
the user, so check before putting in
any number.