Users Manual

CLASS 2
136
Experiencing
the alligator robot coding
To show how the brightness sensor’s input value and the button sensor’s input value act on the servo motor in
flowchart, it looks like below. Before, we checked how DC motor works with the windmill, but this time we have
to check how the servo motor works.
The program will keep checking the input value of the brightness and button sensor. The brightness sensor’s value
increases when it’s covered and it decreases when it’s not covered.
We have to set it so that when you cover the brightness sensor, the servo motor has to be at an angle in which
the robot closes its mouth. When the button sensor is pressed, the mouth should open at an angle that is set by
the volume sensor.
when the brightness
sensor is pressed, the
mouth closes and when
the button sensor is
pressed, the mouth opens
Program
start
mouth opensMouth closes
brightness sensor button sensor
Brightness sensor and Opening/closing the alligator’s mouth