A proposed outline for a three session "Taste of Tech" course with EV3 (Mindstorms) LEGO robots.
Motors allow robots to interact with the real world and DO something. This is just another kind of output. This lesson teaches the students about motor blocks and introduces a fundamental programming concept, loops. Note, you will not want to show the second program on the screen as it is a solution to one of their challenges for this lesson.
View the iPad Motors Square Code
The first program, Right Angle, drives the robot forward and then turns the robot 90°. Take note, did it turn exactly 90°? Most likely it did not. Each motor from the factory is slightly different plus there are external factors like differences in the surface the robot is running on, how much charge your batteries have when the program is being run, how old or new your wheels are, etc., that can affect the performance of your robot. Usually the difference won’t matter but you may want to tweak the second block in the program to make your robot turn as close to 90° as you can.
The second program, Square, takes the first program and place it in a loop that runs for times which results in the robot driving in a square. The instructor should not show this second program right away. Instead, have the students describe how they could use the first program to make a square before introducing the loop.