DOTE

Chain And Rate

Monday, November 26, 2012

Arduino QuickStart

When you buy an Arduino Diecimila or Duemilanove board, it is usually preinstalled with a sample Blink program that will make the little built-in LED flash. The light-emitting diode (LED) marked L is wired up to one of the digital input-output sockets on the board. It is connected to digital pin 13. This really limits pin 13 to being used as an output, but the LED only uses a small amount of current, so you can still connect other things to that connector.

All you need to do to get your Arduino up and running is supply it with some power. The easiest way to do this is to plug in it into the Universal Serial Bus (USB) port on your computer. You will need a type A-to-type B USB lead. This is the same type of lead that is normally used to connect a computer to a printer. If you are using the older Arduino Diecimila board, make sure that the power jumper is in the USB position. The jumper should connect together the two top pins to allow the board to be powered from the USB. The newer Arduino Duemilanove boards do not have this jumper and select the power source automatically. If everything is working okay, the LED should blink once every two seconds. The reason that new Arduino boards have this Blink sketch already installed is to verify that the board works. If your board does not start to blink when connected, check the position of the power jumper (if it has one) and try a different USB socket, possibly on a different computer, as some USB sockets are capable of supplying more power than others.

Also, clicking the Reset button should cause the LED to flicker momentarily. If this is the case, but the LED does not flash, then it may just be that the board has not been programmed with the Flash sketch; but do not despair, as once everything is installed, we are going to modify and install that script anyway as our first project.

Installing the Software

Now we have our Arduino working, let’s get the software installed so that we can alter the Blink program and send it down to the board. The exact procedure depends on what operating system you use on your computer. But the basic principle is the same for all. Install the USB driver that allows the computer to talk to the Arduino’s USB port. It uses this for programming and sending messages. Install the Arduino development environment, which is the program that you run on your computer that enables you to write sketches and download them to the Arduino board. The Arduino website contains the latest version of the software.

Configuring Your Arduino Environment
Whatever type of computer you use, you should now have the Arduino software installed on it. We need to make a few settings. We need to specify the operating system name for the port that is connected to the USB port for communicating with the Arduino board, and we need to specify the type of Arduino board that we are using. But first, you need to connect your Arduino to your computer using the USB port or you will not be able to select the serial port.

The serial port is set from the Tools menu, the list of ports for LINUX is similar to the Mac.

If you use many USB or Bluetooth devices with your Mac, you are likely to have quite a few options in this list. Select the item in the list that begins with dev/tty.usbserial On Windows, the serial port can just be set to COM3.

From the Tools menu, we can now select the board that we are going to use. If you are using the newer Duemilanove, choose the first option. However, if you are using the older Diecimila board, select the second option.