Making Things Interactive

January 29, 2008

LadyAda Tutorials

Filed under: 3: LadyAda Tutorials,Siddartha Butalia — sbutalia @ 2:08 am
Tags: , ,

Blinking

int ledPin = 13;

void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
digitalWrite(ledPin, HIGH);
delay(50);
digitalWrite(ledPin, LOW);
delay(1000);
}

Multiple LEDs/Colors

int Pin1 = 13;
int Pin2 = 12;
int Pin3 = 11;

void setup()
{
pinMode(Pin1, OUTPUT);
pinMode(Pin2, OUTPUT);
pinMode(Pin3, OUTPUT);
}

void loop()
{
digitalWrite(Pin1, HIGH);
delay(50);
digitalWrite(Pin2, HIGH);
delay(50);
digitalWrite(Pin3, HIGH);
delay(50);
digitalWrite(Pin1, LOW);
delay(100);
digitalWrite(Pin2, LOW);
delay(100);
digitalWrite(Pin3, LOW);
delay(100);
}

Video of LightBox

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: