Arduino Tutorial #1

Materials:

  • LED Light
  • Breadboard
  • Breadboard wires
  • 220 Ohm Resistor
  • Arduino UNO

Wiring Diagram

ledLight

  • Connect the GND to the – rail (blue)
  • Connect the resistor to a terminal strip
  • Connect the cathode for the LED light (it is the short leg) to the same terminal strip as the resistor
  • Connect the anode for the LED light (it is the long leg) to another terminal strip
  • Connect the terminal strip for the anode to digital pin 13 (in the diagram it connects to the + rail and then the digital pin)

Schematic

The following image shows the same circuit.  Schematic diagrams are often used because they can be eaily drawn by hand and it is a standard way to communicate information about a circuit.

ledSchematic

Program

Type the following into the Arduino software:

arduinoled

If you upload this code you should see the LED light go on and off.

Troubleshooting

  • If you get an error when uploading check that the spelling is correct (if a capital letter is required it has to be a capital letter).
  • Problem Uploading to Board  is a common error – click Tools and select the port that has your Arduino listed.
  • If the LED light on the arduino flashes but your LED light on the breadboard does not – make sure the wires are connected to the correct spot.
  • If the LED light on the arduino flashes but your LED light on the breadboard does not – make sure the anode (long leg) of the arduino is going to the digital pin 13.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s