Announcements

November 24, 2007
Reading for November 27th, are now posted. Enjoy!

October 2, 2007
To upload your thoughtless acts, create a new assignment page like any other lab. You'll see "Thoughtless Acts" listed as one of the assignment options.

May 24, 2008
This site has been archived and is no longer editable. Stay tuned for the next version, coming in the fall!


Lab1- Blinking LED

Project Members: 
Emelie Cheng
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
  1. Arduino board
  2. White breadboard
  3. Red LED
  4. 220-ohm resistor (labeled as red-red-brown-gold)
  5. Wires (black and blue ones connect to ground, and yellow one connects the resistor to pin13)
  6. 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


Powered by Drupal - Design by Artinet