Step 1: Connecting Power and Ground
Start by connecting 5V and GND pins on the Arduino to the 5 volt and ground rails on the breadboard.
Connect the voltage rails on the breadboard to the 5V and GND pins.
Continue to the next step.
Step 2: Arrange and Connect LEDs
Next, arrange the 6 LEDs in a bar graph formation, giving each of them their own digital pin (2 through 7).
- Arrange the 6 LEDs in a line on row E on the breadboard.
- Using the picture as a guide, connect the anodes (long, right legs) of the LEDs to digital pins 2 through 7.
- Connect the cathode (short, left leg) of each LED to ground through a 220 ohm resistor.
- Continue to the next step.
- Stuck? HINT: You don't need to individually set the resistance of each resistor by highlighting it and using the dropdown menu. Simply create one 220 ohm resistor and copy/paste it 5 times using CONTROL-C and CONTROL-V key strokes.
Step 3: Add the Tilt Sensor
Place the tilt sensor on the breadboard. Notice the notch in the lower right hand corner by terminal 1. The left terminals (1 and 2) are connected to each other, and the right terminals (3 and 4) are connected. You'll be making connections to bottom terminals 1 and 3.
- Place the sensor on the breadboard in rows D and E on the breadboard, as shown in the picture.
- Connect one side of the tilt switch to the 5 volt rail with a wire.
- Connect the other side to ground through a 10 k-ohm resistor.
- Connect the terminal where the sensor and resistor meet to digital pin 8.
- Continue to the nest lesson to learn how to write the Digital Hourglass code.
Next Lesson:Writing the Code