Year 4 - Lesson 1
(Blinks Like Me)
Learning Intention
- I can program a robot to repeat movements with a random wait between
Introduction
How often do you blink? How long is a blink? Are there times when you blink more or less often? When and why? Could we make Ohbot blink and move a bit like we do?
How often do you blink? How long is a blink? Are there times when you blink more or less often? When and why? Could we make Ohbot blink and move a bit like we do?
Activities
1. Challenge children to write a program to make Ohbot’s lids blink once when the green flag button is clicked. It might help to get children to think about the starting position of the lid blink. if Ohbot’s eyelids start from open the LidBlink motor will be in position 10, so the first instruction to run will need to set the LidBlink motor to 0 to close Ohbot’s eyelids.
1. Challenge children to write a program to make Ohbot’s lids blink once when the green flag button is clicked. It might help to get children to think about the starting position of the lid blink. if Ohbot’s eyelids start from open the LidBlink motor will be in position 10, so the first instruction to run will need to set the LidBlink motor to 0 to close Ohbot’s eyelids.
2. Challenge children to alter their programs to make Ohbot blink continuously. Explore how the length and frequency of blinks can be altered by altering values of the wait instructions.
3. Discuss whether humans blink in this way. Introduce the idea of random wait between blinks. Introduce the pick random operator from the Operators palette. Explain that the two numbers in the operator set the range that the random number is picked from. Encourage children to introduce this into their program and investigate altering the values to make Ohbot’s blinks as realistic as possible.
We can now use our random blink program as a skeleton to make other parts of Ohbot move at random intervals.
We can now use our random blink program as a skeleton to make other parts of Ohbot move at random intervals.
4. Can you write a program so that Ohbot continuously nods its head with a random wait between nods?
5. Can you write a program so that Ohbot continuously shakes its head with a random wait between shakes?
5. Can you write a program so that Ohbot continuously shakes its head with a random wait between shakes?
Extension
Challenge children to create a program that makes Ohbot have either alert (infrequent short blinks) or sleepy eyes (frequent long blinks)(see code sequence). They will need to use two random blocks within their code the second will set the frequency of the blinks and the first will set how long each blink lasts.
Challenge children to create a program that makes Ohbot have either alert (infrequent short blinks) or sleepy eyes (frequent long blinks)(see code sequence). They will need to use two random blocks within their code the second will set the frequency of the blinks and the first will set how long each blink lasts.
Plenary
What did you make Ohbot do? In which ways were your Ohbot’s movements similar to and different from the way you move?
What did you make Ohbot do? In which ways were your Ohbot’s movements similar to and different from the way you move?