This project is designed by Prince Kushwaha from COSM Electronics. It demonstrates how to create a digital dice using a 7-segment display controlled by an Arduino and a push button. The display shows a random number between 1 and 6 when the button is pressed, and it also displays a moving pattern when the button is not pressed.
- Arduino
- 7-segment display
- Push button
- Resistors
- Jumper wires
- Breadboard
-
7-Segment Display:
- Connect segment
ato Arduino pin 2. - Connect segment
bto Arduino pin 3. - Connect segment
cto Arduino pin 4. - Connect segment
dto Arduino pin 5. - Connect segment
eto Arduino pin 6. - Connect segment
fto Arduino pin 7. - Connect segment
gto Arduino pin 8.
- Connect segment
-
Push Button:
- Connect one side of the push button to Arduino pin 9.
- Connect the other side of the push button to ground.
- Use a pull-up resistor for the push button connection to ensure a stable input.
-
Power:
- Connect the VCC of the 7-segment display to the 5V pin on the Arduino.
- Connect the GND of the 7-segment display to the GND pin on the Arduino.
- Upload the provided code to your Arduino.
- Connect the 7-segment display and the push button as per the circuit connections.
- When the Arduino is powered on, the 7-segment display will show a moving pattern.
- Press the button to display a random number between 1 and 6.
Designed by Prince Kushwaha from COSM Electronics