Lesson Plan
Materials
These lessons go along with Cyclone Arcade Game: Intro To Arduino Kit (Ages 9+) [KIT-4-4].
Classroom sets available. Contact us at info@barnabasrobotics.com to inquire.
Programming the Winning Condition
It’s time to turn your circuit into a real game. You’ll program the Cyclone so it can decide whether the player pressed the button at the right moment, introducing the logic that determines when a player wins.
Tutorial Video
What You’ll Learn
- Use program logic to create a win condition
- Combine the LED sequence with button input
- Test how timing affects gameplay
Follow Along
- Follow the video to add the winning condition to your existing program.
- Test the game several times by pressing the button at different moments.
- Confirm that the program can tell the difference between a winning and non-winning press.
Check Your Work
Before moving on, make sure your project behaves like the example shown in the video. If something isn’t working, compare your wiring and code carefully with the video before changing multiple things at once.
What’s Next?
Next, you’ll add a servo motor so your game can create a physical response when the player wins.