Downloading the Arduino software
The first thing we need is the Arduino Integrated Development Environment (IDE). One of the best parts about Arduino is that the software in which we need to program the boards is free and open source. The Arduino IDE is compatible with Windows, Mac OS X, and Linux.
Getting ready
We only need one thing to complete this recipe—a computer connected to the Internet.
How to do it…
Follow these simple steps:
- Visit the Arduino website at http://arduino.cc/.
- In the main menu, go to the Download section.
- Select your operating system and download the latest stable release of the Arduino software. At the time of writing, the latest stable version compatible with all standard boards was version 1.0.5.
- After it downloads, install the Arduino software.
There's more
Now that we have the Arduino IDE installed, let's familiarize ourselves with the user interface.
Here is a screenshot of the Arduino software running on Windows. It looks the same on Mac and Linux, since it's all written in Java.
First, we will discuss the Tool Bar. In the Tool Bar, we can find the most used buttons:
Button |
Description |
---|---|
The Verify button compiles the code and checks it for errors. | |
The Upload button compiles the code and, if there is no error in the code, uploads it to the Arduino board. | |
The New button starts a new program. In the Arduino world, programs are called sketches. | |
The Open button simply allows us to open a saved sketch. | |
The Save button saves the current sketch. | |
This button opens the Serial Monitor window that allows us to communicate with the Arduino board. It is extremely helpful when we debug a program. More information can be found in the Serial output recipe in Chapter 7, Digital Communication with Arduino |
In the Sketch tab, we can see all the opened Arduino Sketches. This comes handy when we want to work on multiple programs at the same time.
The Code Space area is where all the magic happens. That's where we write the code that powers satellites and cat food dispensers. It's a code editor with automatic syntax highlighting and autoarranging.
The Status Display area indicates all the bad stuff. Whenever there are errors in the code, they will be displayed there. It also displays errors in the connection with the board. The only good thing it can display is that the code has been successfully uploaded to the Arduino board.
Additional functionality can be found in the main menu bar. Here, we have the classic File menu where we have Save, Open, Close, and also some examples. In the following recipes, more will be discussed about the menu bar components. A nice trick worth sharing is in the Tools menu—the Auto Format tool will format the code to look professional and clean.
See also
Consider the following recipes to better understand how to use the Arduino software environment:
- The Connecting Arduino recipe
- The Uploading code to Arduino recipe