Lesson 7: Detect Obstacles
Introduction to the concept of obstacle detection and artificial intelligence – Students program the robot to make decisions (artificial intelligence) in response to obstacles in the robot’s environment.
Understanding infrared obstacle detection (Worksheet 7.1)
Students become familiar with the robot’s infrared obstacle detection technology and how the robot can detect obstacles in its path.
Program 1 – Detect an obstacle and stop (Worksheet 7.2)
Students write a program that drives the robot until an obstacle in its path is detected. The robot then stops, avoiding a collision.
Program 2 – Detect an obstacle and avoid (Worksheet 7.3)
Students write a program that drives the robot until an obstacle in its path is detected. The robot then turns away, avoiding a collision.
Program 3 – Detect an obstacle and avoid in a loop (Worksheet 7.4)
Students write a program that contains a continuous loop that drives the robot until an obstacle in its path is detected. The robot then turns away, avoiding a collision. The robot then continues to drive due to the loop looking for other obstacles to avoid.
Program 4 – Right and left obstacle detection (Worksheet 7.5)
Students write a program that contains a continuous loop and has the ability to respond to whether there is an obstacle on the left or right. To do this students use an ‘IF’ icon.
The significance of an IF icon is that it gives the robot the ability to make decisions without human guidance. When this occurs in a robot it is now called an autonomous robot, as it has artificial intelligence. This is a profound concept. Is the robot now alive!?
This lesson can also be used to stimulate discussion about robot cars that have no driver and use sensors to avoid collisions with people, buildings and other cars.
If the obstacle detection is too sensitive or not sensitive enough, students can re calibrate it using the instructions on the following page.