sunrays

Just another WordPress.com site

Blink Blink!

on March 31, 2012

So, I got my first Arduino Mega and was all excited to upload my first sketch.

The first task was to connect the Arduino board to the computer so that sketches can be simply ‘uploaded’ to the board from the computer.

The Arduino site has a separate section called Getting Started w/ Arduino on Windows  (since I am using Windows) which states in 9 simple steps the way to get the Arduino up and running.

It’s just a matter of finding a USB cable, downloading the environment, connecting the board to the computer, installing the drivers and lanching the application. Nothing really looks like it can go wrong but then Windows kept telling me it could not locate drivers. I found out that quite a few people have faced this issue and most forums suggest fixing the issue by changing some computer registers. I am not a fan of tampering with registers and well after some trial and error, I got rid of it.

The Arduino site states “browse to the drivers/FTDI USB Drivers directory of the Arduino distribution” but I left the destination at drivers and that seems to have fixed the issue. (Do not ask me why or how. I have NO clue.)

Now, the Arduino environment comes loaded with some examples of simple and basic sketches that are pretty useful in checking the basic functioning of the entire set up at any point of time. So well, the next thing to do was to run the most basic sketch found in those examples – Blink. It makes the LED go on and off every second.

You can use either the on-board LED (connected to Digital Pin13) or use your own LED on another pin. Connecting the LED is straight forward enough. You just have to make sure the LED is connected in the right direction. The order look something like this:

output pin of Arduino-> resistor -> anode of LED (longer leg) -> LED  itself -> cathode of LED (shorter leg) -> GND pin of Arduino

Connecting LED to Arduino

Connecting LED to Arduino

The rest of the steps flowed smoothly enough and I had a nice blinking LED!!

The Blinking LED

The Blinking LED

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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

%d bloggers like this: