Discovery Experience 4 – The Robot Gets a Brain**The students will understand how robots work and what they can do by learning how to write a simple program**

Resources**Day (2-3): Getting into Mindstrom's Programming)**

Materials Needed:

Materials Needed:

- Mindstorms software
- Lego robot (built yesterday)
- Role cards
- List of tasks (Practice Programming Tasks)

Procedure:

- As a review, students share with a partner their code for how they get from their seat to the door
- Run the code and see if it works
- Class discussion: Does your code cover all the points? Would a Lego robot be able to follow these directions? (“No” because it does not use the right programming language)
- Lecture: This is one of the differences between steps in a sequence and actual code: code is a language that has to be followed exactly
- Students are again broken into teams of three or four (three being the preferred number)
- Assign cards with jobs. Jobs will switch after each activity
- Programmer: person who does the computer work
- Technician: person who works with the robot
- Manager: person who double checks the program to make sure it is right
- All, however, give their feedback into what the program should say.

- Teacher then gives them a simple task to do with their Lego robot. Students write code until the task is complete. Tasks could include:
- Going forward 1 ft
- Going forward 1 ft and turning 90º to the right
- Going forward 1 ft, turning 90º to the right, going forward another 1 ft, and turning 90º right again

- Teams share their code and if there is a difference in code, have a discussion about the fact that there are different ways of programming
- If there are few differences, teacher may have either a more complicated code or a more simple code to show students that there is more than one way to write code and get the same effect

- For each task, students are to switch roles, so that everybody is programmer, technician, and manager at least twice.
- The tasks include:
- Going forward exactly 2 ft and stopping
- Spinning the robot exactly 3 times and then stopping
- Going forward exactly 1 ft, stopping, and spinning 1 ½ times
- Going forward exactly 1 ft and coming back to the same spot
- Turning 90º to the right and going forward exactly 1 ft.
- Going exactly 1 ½ feet forward and turning 90º to the left
*Download: “Practice Programming Tasks”*

- During the exercises, students are to write the following questions in their log and answer them:
- How many rotations were needed to go 2 ft for your code? Using this information, how many rotations would you need to go 4 ft? The idea is to get students to multiply their number by 2
- How many degrees does it take to spin exactly 3 times? Using this information, how many degrees does it take to spin exactly 1 time around? The idea is to get the students to divide their answer by 3.
- How could you use the information from part one to help you get 1 ½ ft? How could you use the information from task 2 to help you get degrees? Both of these are exactly half of their co-parts in task 1 and 2.
- What do you notice about how many rotations are needed to get to 1 ft and how many it takes to get back?
*The idea is to see that it should be the same, so they shouldn’t have to do the second part by trial and error.* - What can you use from the last task to help in this task?
*The idea is to get the students to use information they learn and apply it to future tasks.* - How many degrees does it take to turn exactly 90º right? How many to turn 90º left? How can this help you in the future?
*Same thing of applying ideas to future tasks. This information is especially important, as 90º turns will be used a great deal in the lessons ahead.**This is also in the reference folder “Programming tasks for learning log”.*

- When completed, students share their answers with their teammates, 45 seconds per answer and switch, until all the questions are answered
- In the big group, teacher asks for answers to each and comments on why the tasks were assigned and questions asked
- In student log, students journal about what they learned about teamwork and programming with Lego Mindstorms

**Assessments**

- Learning Log entry
- Student answers to their questions
- Observation of interaction in teams
- Observation of students running their robots

- Kathleen Letsky, Curriculum Specialist
- Nathan Patia, STEM Specialist
- Salvador Cabusi, Technology Specialist
- Robot Invasion
- Krause Family Foundation
- Honolulu, Hawaii
**Tel:**808.778.1265

- ‘Alana Ke Aloha places relationship at the heart of all learning. We create and support projects that engage participants’ imagination, collaboration, and problem solving toward a healthy planet.
- The Krause Family Foundation: ‘Alana Ke Aloha is a private, 501(c) (3) nonprofit organization (EIN: 27-1531421) registered (01/21/2010) in the State of Hawai‘i.