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!


Blinking LED

Project Members: 
Aylin Selcukoglu

Description

Make the LED (Light Emitting Diode) blink using the Arduino board.

Components Used

LED (Light Emitting Diode)
20-ohm resistor (red, red, brown, gold)

Arduino Code

/* Blinking LED
* ------------
*
* Created September 5, 2007  
*
* Turns on and off a LED connected to digital pin 13. Pin 13 has a
* resistor attached to it requiring only the LED to make this work.
* For the sake of practice, the circuit with the resistor was created. 
 * based on: http://www.arduino.cc/en/Tutorial/Blink
*/

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

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

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
}

Item

lab1lab1 - breadboard with blinking LED


Comments

feedback

perfect! thanks!


Powered by Drupal - Design by Artinet