The following information is a single lesson in a larger project. Find more great projects here.

Return to Previous Lesson: Introduction

Lesson Overview:

Now we'll build our simple circuit!

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.

  1. Connect the voltage rails on the breadboard to the 5V and GND pins.

  2. 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).

  1. Arrange the 6 LEDs in a line on row E on the breadboard.
  2. Using the picture as a guide, connect the anodes (long, right legs) of the LEDs to digital pins 2 through 7.
  3. Connect the cathode (short, left leg) of each LED to ground through a 220 ohm resistor.
  4. Continue to the next step.
  5. 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.

  1. Place the sensor on the breadboard in rows D and E on the breadboard, as shown in the picture.
  2. Connect one side of the tilt switch to the 5 volt rail with a wire.
  3. Connect the other side to ground through a 10 k-ohm resistor.
  4. Connect the terminal where the sensor and resistor meet to digital pin 8.
  5. Continue to the nest lesson to learn how to write the Digital Hourglass code.

Next Lesson:Writing the Code

About This Instructable




More by circuits:Introduction Arduino Project 15: Hacking Buttons Arduino Project 14: Tweak the Arduino Logo 
Add instructable to: