Users Manual
CLASS 3
80
Utilize the Ultrasonic Turtle
In order to turn on the LED sensor sequentially, it is necessary to distinguish the sections first. The analog reference
values you currently have are '15', '20', '25'. If so, a total of four sections will be created. , The output of the LED
sensor is divided into four sections when it is smaller than 15, larger than 15, smaller than 20, larger than 20,
smaller than 25, and larger than 25, you have to control the output of the LED sensor in each section.
First, divide the section between '15' and '20', '20' and '25' are expressed using the conditional
operators 'and’.
Did you make a script above? We split up the section using 'and' operator. Now let's put a coding block on how
each LED sensor works in each section.
When it is less than the reference value of '15', all three LED sensors should be off. Turn on the first LED sensor
between '15' and '20' (use digital output 10). When it is between '20' and '25', turn off the first LED sensor and
turn on the second LED sensor (turn off digital 10 and turn on digital output 11). When it is greater than '25', turn
off the second LED sensor and turn on the third LED sensor (turn off digital output 11 and turn on digital output
12). Create a script to do this.
“IF” syntax utilization