Book
Day 3 - Section 3 - Respond to light
Day 3 - Section 3 - Respond to light
Completion requirements
View
After the completion of this section the students will be able to:
- create a Light alarm with their robots
- turn the lights of the robot ON and OFF according to the amount of surrounding light
- program their robot to follow the light
Chapter 8.2 - Automatic lights
Write the following program to have the Edison robot turn the two LED lights on when it gets dark.
Drive the robot through a tunnel or under a couch and see the front lights come on.
In this program we are using the ‘less than’ (<) symbol to determine the path of the program. If the variable Light_Level is ‘less than’ 100, then take the true path and turn the LEDs on.
Experiment with the value (100) in the If icon.