Nine Sided Digital Dice
Reference: https://www.instructables.com/id/Arduino-Led-Dice...
I have added two more LEDs.
The Instructables will show you how to create a special digital dice that can roll out numbers one to nine by using Arduino. It is a simple project, and it is suitable for beginners and those who want to start with Arduino.
Things You Need
Parts:
Arduino 9x LEDs of any kind
A 10k Resistor
9x 220 or 330 Resistor
A little Push Button
Breadboard
Some wires for the breadboard
Tools:
The Arduino programmer
Usb Cable A-B
Place the LED on the Breadboard
Place LEDs in shape of 3x3 square. It is really difficult to find the right configuration without superimpose the LEDs. However, there is a facilitate picture that shows where should you place the short leg of LEDs(cathodes) and where should you place the long leg(anode). I group them into six groups. First group is upper left one and lower right one. Second group is middle right one and middle left one. Third group is upper right one and lower left one. Fourth group is the middle one. Fifth group is upper middle one. And the last group is lower middle one.
Place the Resistor
Connect all the cathodes of the LEDs to ground with resistors.
Place the Button
Place the pushbutton on the breadboard and connect it to ground with resistance.
Connect the Anode With Arduino
Attach the Arduino ground with the ground line of the breadboard.
Connect the LEDs to Arduino. This part is quite complicated. However, there is also a facilitate picture for that.
Connect the 5v of Arduino with the button, and connect the button with the pin 6 of Arduino...be careful also in this part and follow the picture.
Code
https://create.arduino.cc/editor/erniechen904/7f5e26d6-785b-40b1-aac0-67f6c387d4c1/preview