Users Manual
SCRATCH CODING KIT
Explanations
Pelicana robot
Look at the flowchart. When the program starts, the DC motor has to operate and the digital output should be
turned on when the button sensor is pressed. The program should keep checking if the switch was pressed or not.
Do you remember what we learned in using the button sensor?
First, ‘if..or else’ block would be used as the start of the program, and whether the button sensor is pressed or not
will be the condition. If the condition is satisfied (if the button is pressed), dc motor will rotate clockwise, and the
sound sensor will produce the sound by turning on the digital output.
If the condition is not satisfied (if the button is not pressed), the DC motor stops, and digital output turns off,
making no sound. You will be able to do it since it’s a simple script!
Is the button
sensor
pressed?
Start the
program
Turn on digital
10 output
Turn off digital
10 output
Turn on motor 4 Turn off motor 4
Yes No
No
Yes