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:

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

1. Ardunio (I used Leonardo)

2. Rotary encoder (or click-encoder but we don't use the push function)

3. Pushbutton

4. 8 x 8 led matrix with MAX7219 Module

5. Loud speaker

6. wire jumpers

Step 1: Connect Components

8X8 LED Dot Matrix to Arduino:

  1. VCC to 5V
  2. GND to GND
  3. DIN to Arduino D12
  4. CS to Arduino D10
  5. CLK to Arduino D11

Rotary Encoder:

  1. GND to GND
  2. + to 5V
  3. SW to nothing (this is the switch, which we don't use.)
  4. DT to A1
  5. CLK to A0

Push Botton:

  1. one end of the button with GND
  2. and the other end with D2

Speaker:

  1. the black wire connect to GND/ -
  2. the red wire connect to D3

Step 2: 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:

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.