Digital Dice: an Arduino Project.
13334 Views, 15 Favorites, 0 Comments
Digital Dice: an Arduino Project.

People like games "high tech". For example: in my country there is a game called "Monopoly". In that game one must collect "streets" by buying them with money.
That game recently released a version where one doesn't pay with paper but with a credit card.
I was starting to think about what else i couldd modernise...
OMG... I thought while throwing the dice.
10 minutes and a game I won later I started learning Wiring.
when I could do that I bought an Arduino.
Why this Instructable is in the efficiency contest:
The battery's used in the Arduino are rechargables, these can be charged over 1000 times! No throwing away battery's!!
That game recently released a version where one doesn't pay with paper but with a credit card.
I was starting to think about what else i couldd modernise...
OMG... I thought while throwing the dice.
10 minutes and a game I won later I started learning Wiring.
when I could do that I bought an Arduino.
Why this Instructable is in the efficiency contest:
The battery's used in the Arduino are rechargables, these can be charged over 1000 times! No throwing away battery's!!
Materials and Tools.




- Arduino
- Power for Arduino.
- 7 LED's.
- Suitable box.
- Wire.
- Switch
- Soldering Iron.
- Hot glue.
- Dremel.
- Some items like a ruler, I won't actually tell when to use them but it should come in handy.
Soldering.

Solder a wire to all of the LED's (...)
Now bundle up the - wires so you can connect it to the arduino.
Solder wires to your switch
NOTE:
If you don't have jumper wire ( the stuff you can put into the female header) you can use paperclips.
Just solder a paperclip to the points that will connect to the Arduino.
Now bundle up the - wires so you can connect it to the arduino.
Solder wires to your switch
NOTE:
If you don't have jumper wire ( the stuff you can put into the female header) you can use paperclips.
Just solder a paperclip to the points that will connect to the Arduino.
Glueing and Cutting.




First off I recommend using a rotary tool and not a knife.
Measure where the arduino power plug will be and mark it with a pencil. Then drill a small hole in the center.
Keep making the hole bigger until the plug (which is connected to the battery) will fit through.
Now imagine a cross in the top half of your box.
LED positions:
LED 0- Wil be in the middle of the cross and wil be connected to pin 7
LED 1- The upper right corner, pin 13
LED 2- Middle right, pin 12
LED 3- Down right, pin 11
LED 4- Down left, pin 10
LED 5- Middle left, pin 9
LED 6- Upper left, pin 8
Switch- Pick location, pin 5
NOTE: These locations are when the lid is closed!
Measure where the arduino power plug will be and mark it with a pencil. Then drill a small hole in the center.
Keep making the hole bigger until the plug (which is connected to the battery) will fit through.
Now imagine a cross in the top half of your box.
LED positions:
LED 0- Wil be in the middle of the cross and wil be connected to pin 7
LED 1- The upper right corner, pin 13
LED 2- Middle right, pin 12
LED 3- Down right, pin 11
LED 4- Down left, pin 10
LED 5- Middle left, pin 9
LED 6- Upper left, pin 8
Switch- Pick location, pin 5
NOTE: These locations are when the lid is closed!
Upload Code.
Download the code and upload it to your Arduino environment.
The code doesn't generate a random nuber but cycles through the number so fast you can't manipulate it. If you are a beginner I recommend actually looking at it and seeing if you understand how it works.
the first code is the digitaldice with numbers that dissappear after a few seconds. the digitaldice_with_press will need you to press the button again when the numbers are being displayed. it's still in beta though!
The code doesn't generate a random nuber but cycles through the number so fast you can't manipulate it. If you are a beginner I recommend actually looking at it and seeing if you understand how it works.
the first code is the digitaldice with numbers that dissappear after a few seconds. the digitaldice_with_press will need you to press the button again when the numbers are being displayed. it's still in beta though!