In this tutorial you will build a dice that is shaken by holding the button in and thrown by releasing the button. The shake, throw and number thrown are animated and displayed on a seven segment display.
A 74HC595 IC is used to interface the 7-segment display to the Arduino, using only 3 Arduino digital pins.
This circuit simulates a dice being thrown. Pressing the button “throws” the dice. One of six LEDs will light up after the throw.
Each LED has a value from left to right of one to six. If the second LED lights up, the value thrown is 2, if the fifth LED lights up, the value thrown is 5, etc.
Electronic Dice Circuit