The Robot Gets a Brain

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

STANDARDS ADDRESSED

SCIENCE

ELA READING

ELA WRITING

ELA SPEAKING/LISTENING

MATH

TECHNOLOGY

SC.4.1.1

LA.4.1.1

LA.4.4.1

LA.4.6.1

MA.4.2.2

CTE.4.2.3

SC.5.1.2

LA.5.5.1

LA.5.4.1

LA.4.6.3

MA.4.3.1

CTE.5.2.2

LA.5.6.1

MA.4.4.2

LA.5.6.3

MA.4.4.3

MA.4.13.1

MA.5.1.1

MA.5.4.4

MA.5.9.1


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

Time Allotment: 3 days

Day 1: (Introduction to programming)

Materials Needed:

  1. Room to move
  2. Mindstorm software
  3. Lego robot (built yesterday)


Procedure:

  1. To review, students share their drawings of the robot parts in their journal with their table partner.
  2. Definition of programming: “telling a robot exactly what to do step-by-step”
  3. Simple student programming:
      nb10
    1. Have one student stand up.
    2. Tell the rest of the class they want to get the student from one part of the classroom to another. (It would be best if there were a few turns involved.)
    3. One student will listen to suggestions from the class and write a simple code on the board, for example, “five steps forward, turn right, walk two steps”.
    4. Students will “run” the code (have the student walk their program).
    5. Students will change the code until the student gets from one place to the other successfully.
  4. Class discussion: What did you notice about the process of coding? Why does the code have to be so specific? Do the robots think for themselves?
  5. On front screen, teacher shows LEGO Mindstorm software. If possible, have the students load up their own software at the same time and follow along
  6. Teacher writes a simple code in LEGO Mindstrom program (for example: the robot goes forward 3 rotations and turns right) and asks the students what the robot will do. After guessing, they run the code and watch the robot work
  7. Students write the same code themselves and see if the results are the same
  8. Teacher repeats, writing a more complicated code (for example: go backward 10 rotation, turn left, go forward 4 rotattions, and make a noise), and students again try to predict and then imitate
  9. In student log, students journal about what a program does and have to write a simple code for getting themselves from their seat to the door

Assessments:

  1. Learning Log entry
  2. Observation of interaction in teams
  3. Observation of students running their robots


Extension Activities:
Programming:

  1. Teacher shows examples of code (Java, C++, binary, and others)
  2. Teacher explains that at the basic level all code is just 1’s and zero’s called “binary code”
  3. The computer takes the programming language and converts it to zeros and 1’s; binary code
  4. Demonstration with binary code
    • One student stands alone
    • All other students all stand in a row facing one way
    • Every third student turns around; this is to mimic that student going forward
    • Every other student turn around; this is to mimic going backward
    • You can continue with these for turning and otherwise to show what the computer actually reads
  5. There are good websites that have practice programming


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

ResourcesDay (2-3): Getting into Mindstrom's Programming)

Materials Needed:

  1. Mindstorms software
  2. Lego robot (built yesterday)
  3. Role cards
  4. List of tasks (Practice Programming Tasks)


Procedure:

  1. As a review, students share with a partner their code for how they get from their seat to the door
  2. Run the code and see if it works
  3. 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)
  4. 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
  5. nb9
  6. Students are again broken into teams of three or four (three being the preferred number)
  7. 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.
  8. Teacher then gives them a simple task to do with their Lego robot. Students write code until the task is complete. Tasks could include:
    1. Going forward 1 ft
    2. Going forward 1 ft and turning 90º to the right
    3. Going forward 1 ft, turning 90º to the right, going forward another 1 ft, and turning 90º right again
  9. 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
  10. For each task, students are to switch roles, so that everybody is programmer, technician, and manager at least twice.
  11. The tasks include:
    1. Going forward exactly 2 ft and stopping
    2. Spinning the robot exactly 3 times and then stopping
    3. Going forward exactly 1 ft, stopping, and spinning 1 ½ times
    4. Going forward exactly 1 ft and coming back to the same spot
    5. Turning 90º to the right and going forward exactly 1 ft.
    6. Going exactly 1 ½ feet forward and turning 90º to the left
      • Download: “Practice Programming Tasks”
  12. During the exercises, students are to write the following questions in their log and answer them:
    1. 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
    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.
    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.
    4. 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.
    5. 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.
    6. 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”.
  13. When completed, students share their answers with their teammates, 45 seconds per answer and switch, until all the questions are answered
  14. In the big group, teacher asks for answers to each and comments on why the tasks were assigned and questions asked
  15. In student log, students journal about what they learned about teamwork and programming with Lego Mindstorms


Assessments

  1. Learning Log entry
  2. Student answers to their questions
  3. Observation of interaction in teams
  4. Observation of students running their robots

What's Next? > Mission Accomplished