Arduino Digital Dice Project
Make a Digital Dice using your Arduino and a few components!
About this Project
In this project we'll make a Digital Dice. You'll see the schematic, breaboard layout, and how to build the project.
The Arduino Digital Dice is a great project for beginners in Arduino, and for anyone who likes to construct and learn from unique and attractive electronics projects.
The dice scores are shown as a digital number from 1 thru 6 on a 7-Segment display, under the control of the Arduino software.
Press the Roll! Button to roll the dice. It rolls for as long as you hold it pressed, and when you release it, the dice display shows your lucky score.
This project is for the purposes of amusement and learning. Totally random scores can't be guaranteed.
Full Step-By-Step Instructions Video
Watch the full step-by-step instructions video on YouTube:
Components for your Project

To make your project you will need:
-
An Arduino Uno or Mega. You can also use an Arduino Nano or any other Arduino type, but you might need to change the pin assignments for these in the software (this is easy to do)
-
A breadboard
-
A 7-Segment COMMON CATHODE display
-
A pushbutton. You can use a standard 4 pin pushbutton, though the 2 pin buttons like in the picture are much easier to fit into breadboards
-
Seven 330 Ohm resistors. You can use any resistor values ranging from 330 Ohms to 560 Ohms.
-
Assorted breadboard jumper wires
Schematic Diagram

Arduino Port Pin D3 is configured as an input and the Roll! pushbutton is detected by this pin.
Port Pins D4 thru D7 and Pins D10 thru D12 are configured as outputs, and drive the seven segments of the display to make the dice score.
Each of the seven segments has a resistor in series with it which limits the current through the segment LEDs (without this the LEDs would be damaged).
The GND from the Arduino is connected to the Pushbutton and to all of the segment LEDs via their resistors.
The remaining Arduino pins are not connected.
Note: if you have a 7-Segment display with a different pinout, you can change the pin numbering to suit it.
Breadboard Layout

This picture shows the complete Breadboard Layout.
The grey and orange wires are for the Port Pins that sense the Pushbutton being pressed and drive the segment LEDs.
The yellow and red wires are the Ground connections to the Pushbutton and to the LEDs resistors.
Project Software
The project software is in file: ArduinoDigitalDice.ino
The software can be compiled in the Arduino IDE and uploaded to your Arduino.
The software contains comments to tell you what it is doing.
You can change the software if you want to reassign the Arduino Port Pins, or you want to experiment with making the project do different things.
Your Finished Project
