Book Image

Arduino Development Cookbook

By : Cornel M Amariei
Book Image

Arduino Development Cookbook

By: Cornel M Amariei

Overview of this book

Table of Contents (16 chapters)
Arduino Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Connecting Arduino


Before we can start writing code and making things move, we first need to connect the Arduino board to our computer. The Arduino board is compatible with Mac, Windows, and Linux. Here we will discuss how to connect and install the drivers.

Getting ready

The following are the ingredients required for this recipe:

  • An Arduino board connected to the computer via USB

  • The Arduino IDE downloaded and installed

How to do it…

This recipe is split in two, as the steps for Mac and Windows are slightly different.

Mac OS X

Follow these steps to connect Arduino to Mac OS X:

  1. Connect the Arduino to the computer using a USB cable. If everything is properly connected, the green light will turn and stay on.

  2. If you have an Arduino Uno, Leonardo, Due, or Mega 2560, no drivers are needed and the board is ready to go.

  3. If you're using an older Arduino board such as the Duemilanove, Diecimila, or Pro Mini, you will require FTDI drivers. To obtain them, you can visit http://www.ftdichip.com/Drivers/VCP.htm and download the latest. After downloading them, click on the installer and follow the instructions. Finally, reboot the computer and the Arduino board will be installed.

Windows

The following steps are required for the Uno, Mega 2560, Leonardo, and Due boards when connecting Arduino to Windows:

  1. Connect the Arduino to the computer using a USB cable. If everything is properly connected, the green light will turn on and stay on.

  2. Windows will begin its driver installation process and fail. Click the Start button and open the Control Panel. There, navigate to System and then Device Manager.

  3. In the Device Manager window, search for Ports (COM & LPT) and look for a port with a name similar to your board. For the Arduino Uno, the port should be named Arduino UNO…. If there is no such title under Ports, look in Other Devices for an Unknown Device. That will be your Arduino board.

  4. Right-click on the Arduino Board in Device Manager and choose Update Driver Software. Next, select Browse my computer for driver software.

  5. This will require the path to the Arduino driver. This can be found in the Arduino installation folder in Program Files, in the drivers folder. It is named Arduino.inf. Select the file and Windows will finish installing the driver.

These are the steps for the older FTDI-based Duemilanove, Diecimila, Nano, and Mega boards:

  1. Connect the Arduino to the computer using a USB cable. The green light will turn on if everything is connected properly.

  2. In Windows Vista and higher, the drivers will install automatically and the board will be ready for use.

  3. If the driver installation fails, navigate to Device Manager in a similar fashion as for the newer boards and, under Ports (COM & LPT), search for a USB Serial Converter or similar. Choose Update Driver Software, select Browse my computer for driver software, and then select the FTDI driver folder from the Arduino installation folder, in the drivers folder. After selection, click on Next and Windows will finish installing the Arduino board.

See also

The procedure for an Ubuntu Linux computer is at http://playground.arduino.cc/Linux/Ubuntu.