ADVANCED: Going Further
Required lessons: Randomness
Alarm clocks are too easy to turn off. Create a program that will use the robot as an alarm clock. When the alarm goes off, the robot will move around, flash its light, and make noise. The robot won’t stop until it’s put on its tail facing upwards. To see a real-world example of such a robot, check out this video.
Your program should do these things:
- Choose a random number of seconds to wait.
- Wait quietly for that number of seconds.
- When the time is up, the robot should blink its beak, make noise, and move around.
- When the user places the Finch beak up, it should stop moving, blinking, and making noise.