Introduction: Arduino Basics: How to Get Started
The Arduino is a great platform for learning circuits and micro controller programming. For those who don't have experience with circuits or micro controllers it can be hard to know where to start. We'll set up the basics here so that you can get experimenting and learn how much fun can be had with circuits.
Step 1: Installing the Arduino Software
The first thing we'll need to do in order to get things moving is to install the Arduino IDE. This software is where you'll write all of the code that will control the micro controller and the attached circuit components. You can download the IDE at the official Arduino Download Page. Once downloaded you'll need to unzip the folder into a convenient location. Then run the Arduino.EXE file. Once you've done that, you should see the above window.
Step 2: Write Your First Sketch
We'll want to open the example sketch that can get us started. To do so click File -> Examples -> Basics -> BareMinimum. This will open a new window with a small amount of code. This code acts as the framework for our program. The Setup method will be run a single time right as the micro controller is turned on. You should place code in here that you want to run once to configure the Arduino and get it ready to run your program.
A common first project to do is to light an LED. There are multiple ways to do this, but an easy way is this. Connect an LED with its anode pin in pin 13 on the Arduino board and the cathode in the adjacent GND pin. Now add the following code to the setup section of the sketch:
This will set the 13th pin to an output pin, and set it to a high (5 volt) voltage level. With a high voltage on the anode and a low voltage on the cathode the LED will now light. Note that it is best practice to put a resistor in-line with the LED to control the amount of current flowing through the LED to ensure that the LED does not burn out. For this simple example we didn't do it, but keep in mind that you should do this on any real project.
Step 3: Keep Going
Now that you've got the very basics down there's a great deal more to learn about circuits. There are all sorts of tutorials online to help you build and learn how to create exciting things.