February 2012
M T W T F S S
« Jul «-»  
 12345
6789101112
13141516171819
20212223242526
272829  

Leaving Chris World?

Why not bring back a souvenir?

Archives

Blink on Steroids

When new users embark upon the grand learning experience that is physical computing by way of Arduino, they will at some point run Blink.
Blink is a simple program designed to show you that your board is working and that you now have the capability to control the world....
Or at least small parts of it.

Normally, people only watch for the on board light but I figured...
"Hey why not something bigger?" I figured that if I was going to be presenting topics in physical computing that I would want to run this simple demo... but with one twist.

I'd use a full on real light bulb instead of a tiny LED.

And that's why I made this.


The circuit is pretty simple but it makes quite a difference.

As I mentioned, I was going for the more wow factor for
my presentation rather than just have a tiny light going on
and off, but that means I wanted to keep the code the same.
I've actually written a couple other ways to turn it on and off.

The Blink source code as it comes with the Arduino IDE....

 
/*
 * Blink
 *
 * The basic Arduino example.  Turns on an LED on for one second,
 * then off for one second, and so on...  We use pin 13 because,
 * depending on your Arduino board, it has either a built-in LED
 * or a built-in resistor so that you need only an LED.
 *
 * 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
}
 

1 comment to Blink on Steroids

You must be logged in to post a comment.