Description
The first lab assignment is to connect a LED on the Arduino board, and make the LED blinking. It looks easy from the picture, but honestly, as an architecture major, I neither knew anything about circuit boards, nor had experience of programming. However, the lecture, the tutorial and the text book gave me ideas. After connecting wires, the 220-ohm resistor, LED, and Arduino board into the white breadboard, as well as installing the USB driver and Adruino application for a while, finally, I finish it. Here is the code, and the pictures.
Components
- Arduino board
- White breadboard
- Red LED
- 220-ohm resistor (labeled as red-red-brown-gold)
- Wires (black and blue ones connect to ground, and yellow one connects the resistor to pin13)
- 2 rubber bands
Code
/* Blinking LED
* ------------
*
* turns on and off a light emitting diode(LED) connected to a
* pin, in intervals of 2 seconds. Ideally we use pin 13 on the Arduino
* board because it has a resistor attached to it, needing only an LED
* Created 1 June 2005
* copyleft 2005 DojoDave
* http://arduino.berlios.de
* based on an orginal by H. Barragan for the Wiring i/o board
*/
int ledPin = 13; // LED connected to digital pin 13
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital
}
void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); //waits for a second
digitalWrite(ledPin, LOW); //sets the LED off
delay(1000); //waits for a second
}
Pictures


Comments
feedback
Looks fantastic!
Please separate the components into its own section (check out my example report for guidance).
Great photos! =)
dave