User login

Powered by Drupal, an open source content management system

Theory and Practice of Tangible User Interfaces

Lab 1: Introduction to Arduino - Programmable Blinking LED

Submitted by Michael Manoochehri on Fri, 09/05/2008 - 10:54

Michael's Blinky Arduino Project.

More photos of this project: Pic 1 | Pic 2

 

Description:

A project that uses the Arduino board and programming environment to demonstrate how to make an LED blink according to a programmable interval.

Components List:

  • Red Light Emitting Diode
  • 220 Ohm Resistor
  • Arduino board
  • Power came from computer via USB Cable

Notes:

I used the Blink tutorial code found in the Arduino software distribution. One difference from spec: I attached the LED directly to ground, as I did not have an elegantly sized connecting wire.

Acknowledgments:

Without Elizabeth Goodman's advice, I would not have been able to finish before the end of class!

Code used in this Assignment:

/*
* Blink
* http://www.arduino.cc/en/Tutorial/Blink
*/

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

void setup()                    // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()                     // run over and over again
{
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
}