Lab 01
Johnny Pack's first lab!
Step 1: Add 3 LED's
1. Place three LED's (any color) in to the breadboard
2. Connect one end of 220 Ω (ohm) resistor to the top lead (+), should be the longer lead. Do this to each LED.
Step: 2
1. Connect the negative lead(BLACK) to the ground rail.
4. Connect the positive lead(RED) to the 5v rail.
Step 3: Connect LEDs to Arduino
1. Connect the first LED to pin 3.
2. Connect the second LED to pin 5.
3. Connect the third LED to pin 6.
Each of these pins are PWM which allow you to manipulate LED;s brightness and frequeny
Step 4: LED Errors
Be sure to check the positive and negative ends of the LEDs! The longer end is always the postive, to which you will connect to the Arduino. The negative is shorter, which will connect to the 220 Ohm resistor then connects to the PWM pin of your choice! (3,5,6)
Step 5: Explain Serial Input
The user interacts with the IC through serial connection, inputing 256, 4000 would have the LED and maximum brightness for 4000 microseconds. The code then turns on the remaining two LEDs with the same configuration. However, the LEDs are never lit at the same time, once one goes off, another turns on in a specific sequence. 1 to 2 to 3 then back to 1 as it's a forever loop.
Step 6: Code for LED Brightness Control
Attached is the Lab01.ino which contains all of the code for running LED manipulation and brightness of LEDs on an Arduino Uno.