Introduction: Arduino LED Dice

This instructable will show you the simple Arduino Dice with a few steps. The project is suitable for beginners, it contains some basic parts and requires a minimal amount of components. The following explains the preparation of elements for making it, how to connect the component into the breadboard, and the code provided.

Step 1: Step1: Parts and Tools

There are what you need for making this project:

  • Arduino Leonardo
  • Breadboard
  • 6x 220-ohm registers
  • A 10k register
  • 6x Led light of any colors
  • Generic jumper wires
  • A push bottom

Step 2: Step 2: Place the Element on the Breadboard

First, place the 6 LED lights in lines with the long leg of the LED insert to the left. Then connected the 220-ohm registers to each short leg of the LED (right) into the negative electrode. After that, place the pushbutton on the breadboard and connect it to the 10k register. When you press the button, the dice are being rolled by selecting a random number and lighting up the relevant number of LEDs. The LED light can be whatever color you want.

Step 3: Step 3: Connecting the Component With Arduino

Inserting the generic jumper wires to the Arduino to make the product work. Firstavel, connect the wires from the long leg of the LED(left) to the Arduino board from right to left. (from pin 1 to 6) Then attach the wires from the negative electrode on the breadboard to the GND. Connect the button wires to pin 7 and insert the wires from the positive electrode to 5V. Remember the wires placed in GND and 5V should be one negative one positive, or else the circuit board will be burned out. It’s fine to place the position of the wires in different rows if you feel more comfortable for extra empty rows. However, just make sure the six LED lights are connected together and attach to the ground (GND) so the product can work.

The circuit:

  • 6 LEDs attached to consecutive digital pin with 220ohm resistors (yellow) from pin 1 to 6
  • Button switch connected to the digital pin with 10k register (blue) to pin 7
  • Inserted GND from the negative electrode and attached 5V from the positive electrode

Step 4: Step 4: Program Code

Entering the Arduino code so the product can work! The code contains the program for selecting a random number and lighting the relevant number of LEDs. The dice will be thrown when the bottom is pressed.

Click in the following link to get the code:

https://create.arduino.cc/editor/mia0327/478fea50-...