Robotics Task 2: Maze
Subject Area:
    Engineering and Technology

Age or Grade:
    9th through 12th grade

Estimated Length:
    4-5 class periods

Prerequisite knowledge/skills: 	
Simple Machines
Freshman physics and understanding of position, velocity and acceleration
Use of Microsoft Windows operating environment
Concepts learned in previous robotics tasks

Description of New Content:
    Students will build and program a robot to navigate through a maze using open-loop control and touch sensors for closed-loop feedback

Students will learn about:
a text-based programming structure
programming loop structures
conditional logic
flowcharts
linear  and rotational motion control
Motor Outputs
use of feedback with sensors
logical and syntax errors
the need for sensor inputs

Materials Needed: 	
LEGO Mindstorm kit for every 2-3 students
Computer for every Mindstorm kit
Brix Command center software
At least 6 AA batteries per kit (rechargeable recommended)
4x4' white-board sheet
Scrap wood: 2”x2” or similar
velcro, wood screws or glue

Procedure

    On a 4'x4' whiteboard, construct a simple maze by using scrap wood as walls and attaching the walls with screws, wood glue, or velcro. The shapes and path  of the maze is your choice, but make sure that no dimension is smaller than 10 inches to allow a reasonably sized robot to fit and make turns.

    Hold a class discussion on what a flowchart is and how it can be used for decision making. Discuss how humans make simple yet involuntary decisions all the time based on sensory inputs (touch, sight, smell, etc) daily. As a class, create an example flowchart of how a person involuntarily makes decisions while walking to cross the street at a crosswalk. Dissect the flowchart into components such as decision block, feedback, and operation block.

    For this task, you can introduce the touch-sensor and how it can be used with logical operators and various loop structures to sense objects. Students can now use  the touch-sensor to sense when to turn (closed-loop feedback) or time to determine when to turn (open loop feedback). The students should see that they have a better chance of completing the maze using the touch-sensor as feedback. Offer example statements of how to program the robot such as "drive forward until the robot hits something" and how this statement can translate into code.

    Again, a scoring system can be created based on a time limit and fastest completion time.

Evaluation:
  Have students turn in a complete description of how their program works, any problems encountered, and the solutions to the problems. In addition, have the students turn in a copy of their programming code and a flowchart showing their programming algorithm.

    Student understanding will be apparent with the flowchart and how students are able to convert decision making into a flowchart and convert the flowchart into a program. A student who is having trouble understanding will probably not use or incorrectly draw the feedback on the flowchart

Resources: 	
www.legoeducation.com
http://mindstorms.lego.com/eng/community/resources/default.asp
http://en.wikipedia.org/wiki/Flowcharthttp://bricxcc.sourceforge.net/http://www.legoeducation.comhttp://mindstorms.lego.com/eng/community/resources/default.asphttp://en.wikipedia.org/wiki/Flowchartshapeimage_2_link_0shapeimage_2_link_1shapeimage_2_link_2shapeimage_2_link_3