Intro: Arduino Dice
This instructables will show you how to create electronic dice out of an Arduino and a few other components.
Step 1: Parts
What you will need:
18 Jumpers (11 large 7 small)
7 LEDs (I used red ones)
Resistor (I used 100ohm, 10 ohm would work too)
Arduino (+usb cable for connection)
Optional: small strapdown copper jumpers
Okay, lets build it.
Step 2: LEDs
First start by cutting the leds shorter, so they fit better on the breadboard.
Then start aranging them onto the board, having the negative side of the leds point to the left. LED 1 goes between pins (1-,2+)
LED 2 goes on (5-,6+) and LED 3 on (9-,10+). LED 4, in the middle, must be streched between (4-, 7+). The last 3 LEDS go directly below the first 3 leds, but on the other side of the breadboard.
Step 3: Connect LEDs to Ground
Grab your jumpers (for this step I used the smaller jumpers to make life easier) and connect all of the negative(-) sides of the LEDs to the ground rail.
Step 4: Jumpers to the Arduino
Now, get out your large jumpers, and put a jumper onto each positive(+) side of the leds. It is much easier if you color code the jumpers, it will help later. Also connect a large jumper to the ground rail, and that will connect to the ground on the arduino. In the list it was optional, but I used a small peace of coated copper wires to hold all the large jumpers down.
Step 5: Pushbutton
Now, we connect the pushbutton. Start by placing the pushbutton onto the board, between the crack in the board. I used a 100kohm resistor, but others would work too. Place said resistor onto the board coming off of one of the pushbutton sides (see the diagram for further understanding).
Step 6: Connect the Jumpers to the Arduino
Now, we connect the jumpers onto the arduino board itself.
If you did not already connect the pushbutton to the arduino board, the previous step shows that.
Step 7: Code!
Now, connect the arduino board to your computer and upload this code.