Arduino ELECTRONIC-DICE Project
The original idea was from https://www.instructables.com/id/Arduino-Project-E-Dice-Beginner/, a project by .A..
Some improvements are made, I added some LED and sound effects. Plus, I used an Arduino Leonardo board but not an Arduino UNO board, but the code can be used for both boards.
How to use: Press the button then wait for the dice outcome. If the red light is on means it is still processing! The outcome is shown when the red light is off.
Supplies
To make this project, you'll need:
1- Arduino Leonardo (Arduino UNO is fine)
1 - breadboard
7 - blue LEDs
1 - red LED
7 - 100 ohm resistances
1 - 10k ohm resistance
1 - button
1 - Speaker 8 ohm (0.5 watt)
1 - battery or power bank
Jumper wires
Making the Circuit on Breadboard
Step 1: Put 7 blue LEDs on the breadboard, make a square.
Step 2: Take 7 jumper wires and connect from digital pin 7-13 to each LED's positive leg.
LED 1 - pin 13
LED 2 - pin 12
LED 3 - pin 11
LED 4 - pin 10
LED 5 - pin 9
LED 6 - pin 8
LED 7 - pin 7
Step 3: Take a red LED and put aside the blue LEDs, positive leg connects to digital pin 2
Step 4: Connect all resistances
Step 5: Connect a button to the breadboard
Step 6: Connect all LEDs and button to the ground (GND) with their negative leg
Step 7: Add a speaker (red (positive) leg to digital pin 3, black (negative) leg to GND)
Coding
Check out the code in the link: https://create.arduino.cc/editor/tliace/bf832bd1-bb16-4f0e-b2e9-e3dd16937624/preview
Or download the code from the attached file
Downloads
Connect to a Battery or a Power Bank
Decoration!
Make a box to cover the wires!
Decorate it nicely as you want!
Then...Done!