Easy Arduino LED Dice

by madisonfried in Circuits > Arduino

3894 Views, 46 Favorites, 0 Comments

Easy Arduino LED Dice

IMG_0830.JPG
IMG_0832.JPG

This instrcutable will show you how to hook up LEDs to show a face of a dice when a pushbutton is pressed.

Supplies

IMG_0847.JPG
IMG_0852.JPG
IMG_0851.JPG
IMG_0850.JPG
IMG_0849.JPG
IMG_0848.JPG

For this project you will need to following:

11 long jumper wires

7 short jumper wires

7 LEDs

1 breadboard

1 Arduino Uno

1 USB cable for the Arduino

1 push button

1 resistor

Start With Assembling Your LEDs

IMG_0841.JPG
IMG_0840.JPG

You will take your LEDs and place them in a H formation.

LED1: pins 1 and 2

LED2: pins 5 and 6

LED3: pins 9 and 10

LED4: pins 4 and 7

LED5: pins 3 and 4

LED6: 7 and 8

LED7: 11 and 12

Start Wiring the LEDs

IMG_0839.JPG
IMG_0838.JPG

You will take your 7 short wires and start placing them on one side of the LED. One end of the wire will go in the negative channel on the board and the other on the same row as a LED leg. To connect the opposite side of the LEDs place a wire in the same row as a already connected wire and place it in the same row as the LED leg.

Hook Up the Wires That Will Connect to the Arduino

IMG_0837.JPG
IMG_0836.JPG
IMG_0835.JPG
IMG_0834.JPG
IMG_0833.JPG

Now you will take 8 of the 11 long wires and place them in your board on the other leg of the LED. Each LED needs one long wire and one short wire connected to it. Once the long wires are hooked up to the board you will place them in pins 1-7 on your Arduino.

LED1 in pin 1

LED2 in pin 2

LED3 in pin 3

and so forth

Once you have those 7 wires connected you will take the 8th wire and connect it to the ground on the pin side of the Arduino. One end of the wire will go in the negative channel that the short wires are plugged into and the other end in the Ground pin next to pin 13 on your Arduino.

Hooking Up the Push Button

IMG_0845.JPG
IMG_0844.JPG
IMG_0843.JPG
IMG_0842.JPG

Take the resistor and place it into channel 21 and channel 27. In each channel place one end of the push button. Take one of the long wires and place it in channel 27 and connect it to the 3.3V pin on your Arduino. Take another long wire and place it from the positive channel to the Ground next to the 5V pin on your Arduino. In channel 21 place a long wire going from that channel to pin 8.

Codes

Here is a code to test whether your LED connections are correctly connect. The LEDs should flash.

Downloads

Code Pt.2

Here is the code that makes the LEDs show a face of a dice when triggered by the push button.

Downloads