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!


LED Blink

Project Members: 
Laura Greig

Description:

Use the Arduino to make an LED blink.

Components:

• Red LED

• 220 Ohm resistor 

Code:

/*
* Code found in the Arduino tutorial:
* http://www.arduino.cc/en/Tutorial/Blink
*/

int ledPin = 12; // LED connected to digital pin 12

void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(random(100,1000)); // waits for a random duration
digitalWrite(ledPin, LOW); // sets the LED off
delay(random(100,1000)); // waits for a random duration
}

blinkblink

Having image posting problems, so please find here: link


Comments

feedback

nice job, laura!

Please check with us on getting photos uploaded on the website during lab. However, flickr does add quite an experience to navigating your circuit :)

dave


Powered by Drupal - Design by Artinet