Users Manual
SCRATCH CODING KIT
You have learned that the broadcast that opens the door in the front is 'Open_Door'. Now create a script when
you receive a broadcast that closes the door. The name of this broadcast is 'Close_Door' for associativity. The role
of the 'Close_Door Receiving' script is to close the door and play the sound sensor for 2 seconds. Let's go ahead
and make it.
reate a script like the one above. First, close the door by activating the angle of motor No. 8 (servo motor) by the
value stored in the 'Close' variable. After that, turn on Digital 11. (Turn on the sound sensor). After playing it for
2 seconds, turn off digital output 11 (turn off the sound sensor) and then store 'close' in the 'door' variable. The
'door' variable is a variable that indicates the current state of the statement.
We created a script that closes the door. Now the script for the door opening and closing actions is
ready. On the next page, we will learn coding by inputting numbers from 1 to 4 by using button sensor
and infrared sensor in earnest.
Tori secret safe ‘Close_door’ coding
Activity