Students have learned how to build circuits with buttons and LED lights, now they will learn how to use the status of buttons (pressed is ON, not pressed is OFF) to turn an LED light on and off.
In this project, students design a timing game to play against each other. The build consists of two LED lights and a button. The lights blink back and forth and when the button is pressed, it will stop on either the red light or the green light.
This is a game of chance which simulates rolling of dice by using a random number generator. The code checks to see what number was “rolled” and turns on a corresponding LED.