User login

Powered by Drupal, an open source content management system

Theory and Practice of Tangible User Interfaces

Blinking LED light

Submitted by RyanKaufman on Wed, 09/10/2008 - 21:19

Assignment: Introduction to Arduino and Physical Computing

Collaborators:

A circuit with a 220Ω resistor and LED diode are programmed to blink at a specific rate on the computer and translated through pin 13 of the arduino board. The rate is adjusted with on/off parameters.

 

 

Here is the code with the adjusted rate:

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(625); // waits

digitalWrite(ledPin, LOW); // sets the LED off

delay(325); // waits