A proposed outline for a three session "Taste of Tech" course with EV3 (Mindstorms) LEGO robots.
Simple input and output can be used together to create complex behaviors. In this exercise the students create their first fully autonomous robot. After the students have replicated the Avoid Walls program as written they can adjust the program to react to obstacles “sooner” or take a different corrective action (other than backing up and turning).
This program allows the robot to drive forward while using the ultrasonic sensor to detect obstacles. If an obstacle is detected the robot will back up and turn to drive in a new direction.