Day 2 - Section 2 - Using Variables and Detecting Obstacles
Day 2 - Section 2 - Using Variables and Detecting Obstacles
After the completion of this section the students will be able to:
- create and use variables in Edison software
- use the infrared sensors to detect obtacles
- make the robot stop if it detects an obstacle
Chapter 5.2 - Infrared obstacle detection
The Edison robot is equipped with infrared (IR) ‘vision’. IR light is not visible to the human eye, so you can’t see this light, but it allows Edison to ‘see’ in the dark.
For Edison to detect obstacles IR light is emitted forward from the left and right side of the robot. If the IR light is reflected off an obstacle such as a wall, then the reflected light is detected by Edison’s single IR detector. The IR detector is in the front centre of the robot.
In the illustration below there is an obstacle to Edison’s left, so only IR light from the left emitter is reflected. From the received signal Edison can determine that there is an obstacle to the left, but no obstacle to the right.
Emitted IR light is shown in red and reflected IR light is shown in blue.