How-To Guide

ToUse IF" Block
Let us learn how to use IF" block.
톨홉톨밀
You may use forward sensors, floor sensors and light sensors.
The
IF" block can behave differently depending on external circumstances
or
conditions.
When using the
IF" block, you must use CLOSE" block together.
The
IF" block is mainly connected to the SENSOR" block, which can cause different actions
depending on the state
of
the sensor.
You may say it
If-
then ...
".
IF"
Block
Sensor Combination
Example
1)
To
make the light turn on itself when it gets dark? ->
Li
ght sensor
Example
2)
To
stop by itself when an obstacle is present
->
Front sensor
Example
3)
To
respond to black lines -> Bottom sensor
IF"
Block
Usage
Example)
톨뭘를
l
톨웰를
l
톨뭘를
l
Li
ght
Señsor
Front
Sensor
Li
ne
Sensor
톨뭘페
a
톨뀔
I
J
I
톨월
m
薰蓋體
l
많숫蓋뚫
l
쫓蓋때
1)
If
the light sensor detects darkness -> Run TURN ON LED"
2)
If
there is an obstacle ahead -> Run BACK" + MOVE"
3)
If
a black line is detected in the floor sensor -> Run MAKE SOUND"
Using
I
F"
blocks can make Choco" to recognize obstacles by itself and avoid them.
Let us use the
I
F"
block to make Choco" move by itself.
11