Electrical Multiple Faceted Dice
by ginawu.11.24 in Circuits > Arduino
562 Views, 0 Favorites, 0 Comments
Electrical Multiple Faceted Dice
There's a lot of projects teach you how to make an electrical or LED dice on instructables site, but this project is different, this electrical dice can be adjust into different amount of faceted. You can choose the sided of the dice by your self, there're 6, 10, 20, 30, and 40 multiple faceted dice you can chose from.
I made this project based on:
https://www.instructables.com/id/E-dice-Arduino-Di...
And I change some part of the code and structure my self.
- 1 die: showing big dots
- 2-6 dice: showing dots as well as total value (alternating)
- 4, 5, 8, 10, 12, 20, 24 and 30 faced dice showing value and indicator for chosen dice
- animation for rolling dice when pressing the button
- the sound effect while pressing the button (the part that I change from original project)
Supplies
Connect Components
8X8 LED Dot Matrix to Arduino:
- VCC to 5V
- GND to GND
- DIN to Arduino D12
- CS to Arduino D10
- CLK to Arduino D11
Rotary Encoder:
- GND to GND
- + to 5V
- SW to nothing (this is the switch, which we don't use.)
- DT to A1
- CLK to A0
Push Botton:
- one end of the button with GND
- and the other end with D2
Speaker:
- the black wire connect to GND/ -
- the red wire connect to D3
The Code
This is the file of the code:
https://create.arduino.cc/editor/ginawu_1124/3d99b...
And remember to install 3 libraries into the code, you can download them from these link:
- https://www.arduinolibraries.info/libraries/led-co... for LED control
- https://www.arduinolibraries.info/libraries/timer-... for TimerOne
- https://github.com/0xPIT/encoderfor Encoder
Make It Pretty
I use a paper box to hide the wires and the Arduino board like this.
And I cut some holes to give some space to show the speaker, encoder, push button, and the led Matrix.
You can also cover the led matrix with a translucent cover to make the led light softer if you want to.
When you finish, you'll have a nice looking and useful multiple sided dice for your own.