Digital Dice using Arduino

We all are familiar with dice and often played LUDO or SANP SIDI (Snake & Ladders) game by using dice. Dice is a squire type solid box which contains 6 different numbers on all of its sides. We throw dice on a surface to get a random number while playing the games. In this project we have tried to replicate it with a digital dice using arduino uno board. In place of throwing the dice, here we need to press a button to get a random number between 0 to 6.

Digital Dice Project

Required Components

  1. Arduino UNO
  2. Seven segment display (Common Anode)
  3. Push buttons
  4. Connecting wires
  5. Bread board
  6. 1 k resistor
  7. Power supply

Circuit Diagram and Explanation

Digital-Dice-Circuit

As shown in the above digital dice circuit, arduino is used for controlling whole the process. Two push buttons are used in the circuit – one to start the dice and other for resetting the dice. Arduino reads these two buttons and perform the operation. A seven segment display is used to display the dice result.

Arduino is continuously executing rand() function and stored its value in to a temporary variable. When dice button is get pressed stored value calculated and display on seven segment by using appropriate method (see programming part of article).

Here in this dice circuit, a common anode seven segment display is used for displaying dice numbers, which is directly connected to arduino digital pin numbers 6, 5, 4, 3, 2, 1, 0. And common anode pin of seven segment is connected with +5 volt 220 Ohm resistor. Two push button are also connected namely dice button and reset button which are connected to digital pin 14 (A0) and 15 (A1) with respect to ground.

 


About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation and engineering. My writing style is clear and simple, and I am skilled in using infographics and diagrams. I am a great researcher and am able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top