Understanding variables (Worksheet 9.1) Students learn about what a variable is in computing and how to set one up in the Edison robot. They also learn about the two different sized variables; (8 bits 0 to 255) and ‘bytes’ – (16 bits -32,767 to +32,767). ‘words’ Program 1 Light level alarm (Worksheet 9.2) – Students write a program that sounds an alarm when the lights in the room are turned on. This program introduces the use of variables and basic mathematics using a than’ ‘greater (>) comparison. Program 2 Automatic lights (Worksheet 9.3) – Students write a program that drives the robot forward while monitoring light levels. If the robot drives into a dark area the front lights are automatically turned on. This program uses a than’ (<) comparison. ‘less Program 3 Light following (Worksheet 9.4) – Students write a program that drives the robot towards bright light, such as that from a torch/flashlight. This program introduces more computational mathematics, using subtraction and then a than’ (<) comparison. ‘less Animal behaviours in robotics The light following program above demonstrates a robot behaviour that is very similar to that of a moth on a warm night being attracted to a street light. This can make a good discussion about the intelligence of both insects and robots. Why is an insect that is attracted to light alive, but not a robot? Lesson 9 Worksheet 9.1 Understanding variables – A variable is piece of computer memory for storing data. What makes variables so useful is that this data can change while the program is running, hence the name variable.
Understanding variables (Worksheet 9.1) Students learn about what a variable is in computing and how to set one up in the Edison robot. They also learn about the two different sized variables; ‘bytes’ (8 bits – 0 to 255) and ‘words’ (16 bits -32,767 to +32,767). Program 1 – Light level alarm (Worksheet 9.2) Students write a program that sounds an alarm when the lights in the room are turned on. This program introduces the use of variables and basic mathematics using a ‘greater than’ (>) comparison. Program 2 – Automatic lights (Worksheet 9.3) Students write a program that drives the robot forward while monitoring light levels. If the robot drives into a dark area the front lights are automatically turned on. This program uses a ‘less than’ (<) comparison. Program 3 – Light following (Worksheet 9.4) Students write a program that drives the robot towards bright light, such as that from a torch/flashlight. This program introduces more computational mathematics, using subtraction and then a ‘less than’ (<) comparison. Animal behaviours in robotics The light following program above demonstrates a robot behaviour that is very similar to that of a moth on a warm night being attracted to a street light. This can make a good discussion about the intelligence of both insects and robots. Why is an insect that is attracted to light alive, but not a robot? Lesson 9 Worksheet 9.1 – Understanding variables A variable is piece of computer memory for storing data. What makes variables so useful is that this data can change while the program is running, hence the name variable.
Your-EdVenture-into-Robotics-10-Lesson-Plans.docx