Introduction: Arduino Tutorial: Flicker a LED

Tired of all those other instructables about how to blink a LED? well how about flickering a LED? eh? there is a ible all about flickering a LED.

Step 1: Wiring

Before we program the arduino we need to get everthing setup.

A) Plug in your arduino to the computer Via USB cable.
B) Add led positive lead to pin 10 on digitial, then with negitive lead to the GND (ground) pin also on digitial
C) Run Arduino IDE software.
D) Go to next step for code.

using the picture below wire your arduino (incase you dont understand what i am getting at here)

Step 2: Ze Code

to make the led flicker you are first going to need the software to program the chip. go to arduino.cc for a full program and other examples. the code you see here should be copied and pasted into the IDE.

int ledPin = 10;
byte flicker[] = {180, 30, 89, 23, 255, 200, 90, 150, 60, 230, 180, 45, 90};

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

void loop()
{
for(int i=0; i,7; i++)
{
analogWrite(ledPin, flicker[i]);
delay(2000);
}
}

Now just click the "upload" button and in a few seconds your arduino will be running the code. Ok in the next step I will explain the code.

Step 3: The Finial Product.

see how it flickers? thats basically what the code does!

Got questions? comments? concerns? list below!

Video
can not parse options from: type="application/x-shockwave-flash" width="400" height="300" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="flashvars" value="intl_lang=en-us&photo_secret=d3eedd10d0&photo_id=3521110370"></param> <param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param> <param name="bgcolor" value="#000000"></param> <param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&photo_secret=d3eedd10d0&photo_id=3521110370" height="300" width="400"></embed></object>, {width:425, height:350}