Manual

8. Checking the Value Returned by IR (Infrared) Sensor
※ EXAMPLE ※
Make Kamibot move Forward and stop if it detects black.
Lets make the Kamibot sprite on the stage say “Black” or “White” depending on
the value returned by the IR sensor. If an IR sensor detects the color Black, it
will return a value of 1. If it detects White, it will return a value of 0.
27
Blocks used:
-When clicked
-Forever
-If else
- c and c
- c = c
-Infrared sensor
-Move forward speed
infrared sensor No. 1
infrared sensor No. 2
infrared sensor No. 3
infrared sensor No. 4
infrared sensor No. 5
Black = 1
White = 0