Chapter 2. Getting Started with the Arduino IDE

Now that you have Arduino connected to power, you are ready to start the IDE. In this chapter, I'll start by covering how to use the IDE in Windows. Then, I'll cover any specific change you might need to make if you are using a Mac.

For this chapter, the objectives are as follows:

  • Load and configure the Arduino IDE
  • Download and run a simple example program

As discussed previously, Arduino comes in many flavors and there are too many to include an example for each one. Sometimes, individual boards will need a special version of the IDE. This book will focus primarily on Uno, perhaps the most popular of Arduino variants. Here and there I'll also throw in an example or two from Mega and one of the small Arduino form factors, FLORA. There are two versions of the IDE: 1.0.x and 1.5.x. Most of your work will be done with 1.0.x, but I'll show you when to use 1.5.x for some newer versions of Arduino. You don't need a board to experiment with the IDE, but it will make much more sense if you have one.

Using a Windows machine to develop with Arduino

If you are using a newer version of Microsoft Windows and the Arduino Uno, when you plug Arduino into the system, it will automatically try to install the drivers. If the device fails to install, you may have to tell it where the drivers are. You will know when this happens—you will be prompted with an error message saying Device driver software was not successfully installed. If you get this error, follow the directions at http://Arduino.cc/en/Guide/Windows#.UxoWXPldUvt.

When your drivers are installed, you should see the following device when you navigate to Start Menu | Devices and Printers:

Using a Windows machine to develop with Arduino

In this case, the device is connected to COM port 23. Note down the COM port Arduino is connected to as you'll need that in a minute. If you are using an Apple Mac or Linux machine, follow the instructions at arduino.cc/en/Guide/MacOSX for Mac and playground.arduino.cc/Learning/Linux for Linux on how to determine your USB port connection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.25