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!


Revision of LED Blink from Thu, 09/06/2007 - 00:24

Project Members: 
Laura Greig


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


Powered by Drupal - Design by Artinet