Users Manual
SCRATCH CODING KIT
Commentary
Coding the Line Tracer Ultrasonic sensor
Try coding when the infrared sensor on the left of the two infrared sensors is on the black servant and the infrared
sensor on the right is not on the black line. If the infrared sensor is on a black subdivision, the analog value will be
smaller, and if it is not over the black line, the analog value will be larger. I'll think of the threshold as '40' and try
coding. And the action at this time should be to the left of the line tracer. You must stop motor # 4 and let motor
# 7 forward.
When you create the above script, the infrared sensor on the left is on the black line. When the infrared sensor on
the right is not on the black line, the motor stops at 4, the 7 motor goes forward and the line tracer goes to the
left. Now let's see how the left infrared sensor is not above the black line and the right infrared sensor is on the
black line. Please create the script below.
When you create the above script, the infrared sensor on the left is not on the black line. When the infrared sensor
on the right is on the black line, motor 4 moves forward, stop motor 7, and let the line tracer go to the right. Now,
let's create a script for an ultrasonic sensor. If the line tracer follows the black line and meets an obstacle, you must
stop using the ultrasonic sensor.