Getting started with Arduino

Well its been so beautiful outside here lately *sarcasm alert* (averaging -40 degrees Celsius…) I decided now might be a good time to dust off my Arduino boards.

arduino-logo

First off, if you have any experience with Arduino micro controllers, this post probably wont be for you. Its been many… many years since I have done any work with them (ahem… high school). I need to build my own skill set back up, so this is a recap for myself, and for those who might be just starting out (or looking to start out) with Arduino boards.

Second off, if you’ve ever used or are still using the Arduino IDE… scrap that. I came across a web app: Codebender which is basically a much better version of the IDE entirely through your browser. It features a fancy editor with syntax highlighting, much better error reporting (in my opinion), a cloud based compiler, and a built in serial monitor. It has all the features of the Arduino IDE, but adds loads more.

codebender

I have several different types of Arduino boards (Pro Mini, Uno R3, Duemilanove, and some mini knock-offs that don’t work worth crap – dswy_robot), but I will probably spend most of my time with the Pro Minis. They are amazingly cheap so if you blow up a board, you’re only out a couple dollars instead of $20-$30…sweet!

arduin-pro-miniWhat You’ll Need

  • Arduino Pro Mini (or Arduino of your choice)
  • USBasp programmer (assuming you’re using the Pro Mini)
  • An LED
  • A resistor, 470 ohm is fairly safe when working with LEDs
  • Male header, or bread board wires

Getting Your Programmer Ready

Before we jump into it, we need to make a cable to connect the Arduino up to the USBasp programmer. Your programmer should have come with a ribbon cable, so its just a matter of connecting those pins up to the proper pins on the Arduino with some breadboard wires. You can use bread board wires to go from the 10 pin connector to your breadboard, or you can cut one end off completely and solder it to a header. It takes a few minutes longer to make the cable, but trust me, you’ll save time in the long run when you need to switch breadboards

usbasp-to-arduinopromini

Make sure you are oriented correctly, Pin 1 on your ribbon cable is the blue wire in the image above. When you’re all done, ideally you want to end up with a cable like this:

homemade-usbasp-cable

 

Make It Blinky Blink!

Alright, so lets get our LED wired up

arduino-blink-wiringVery simple. the anode (longer wire) of the LED connects to pin 10 on the Arduino, and the cathode (shorter wire, typically with flat side on LED) connects up to our resistor. Depending on your LED you can use a smaller resistor, I was using a very bright blue LED so I decided to go with a 470 ohm to dim a down just a touch.

Next we need to upload the sketch to the Arduino using the USBasp, so plug everything in, connect the programmer up to your computer, head over to Codebender, and upload this sketch.

With any amount of luck, you should end up with an LED that blinks every half a second

arduino-blinking-led

3 thoughts on “Getting started with Arduino”

Leave a Reply