Users Manual

SCRATCH CODING KIT
In your 'Monitor_process' script, if the infrared sensor connected to the left detects an obstacle, it broadcasts
'Detect_IR_L' and it stores '1' in variable 'is_Detect_obstacle'.
The 'Detect_IR_L' script shows the situation when the left infrared sensor is recognized, so the car must go to the
right. At this time, it does not go right to the right but has to go back to the right a little back. Create the scripts
below!
If it receives a 'Detect_IR_L' broadcast, broadcasts 'Move_BB' and waits 2 seconds. After that, broadcast 'Move_
FR' and 'Detect_Clear'. As before, 'Move_BB' is the script that runs the car back, and 'Move_FR' is the script that
runs the car to the right. When the operation is completed, set the 'is_Detect_obstacle' variable to '0' through a
script called 'Detect_Clear' to recognize the obstacle again.
The 'Move_FR' script will change the servomotor angle to the right, then move the motor to the right by turning
on the DC motor, the 'Move_BB' script will change the servo motor angle to the forward direction and then move
the DC motor counterclockwise and let the car go back for two seconds.
The 'Detect_Clear' script waits for the car to run for an unobstructed period of 1.5 seconds, then saves a '0' in the
'is_Detect_obstacle' variable to resume obstacle recognition.
Commentary
Operation after judging using the left IR sensor