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:
- Connect the Arduino to the computer using a USB cable. If everything is properly connected, the green light will turn and stay on.
- If you have an Arduino Uno, Leonardo, Due, or Mega 2560, no drivers are needed and the board is ready to go.
- 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:
- Connect the Arduino to the computer using a USB cable. If everything is properly connected, the green light will turn on and stay on.
- 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.
- 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.
- Right-click on the Arduino Board in Device Manager and choose Update Driver Software. Next, select Browse my computer for driver software.
- This will require the path to the Arduino driver. This can be found in the
Arduino
installation folder inProgram Files
, in thedrivers
folder. It is namedArduino.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:
- Connect the Arduino to the computer using a USB cable. The green light will turn on if everything is connected properly.
- In Windows Vista and higher, the drivers will install automatically and the board will be ready for use.
- 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 theArduino
installation folder, in thedrivers
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.