Introduction: 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:
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)
1. Ardunio (I used Leonardo)
2. Rotary encoder (or click-encoder but we don't use the push function)
5. Loud speaker
Step 1: 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
- GND to GND
- + to 5V
- SW to nothing (this is the switch, which we don't use.)
- DT to A1
- CLK to A0
- one end of the button with GND
- and the other end with D2
- the black wire connect to GND/ -
- the red wire connect to D3
Step 2: The Code
This is the file of the code:
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
Step 3: 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.