Maker.io main logo

Introduction to the Arduino IDE

2018-03-27 | By Maker.io Staff

Arduino

The Arduino is a fantastic single-board microcontroller solution for many DIY projects, and, in this blog, we will look at the Integrated Development Environment, or IDE, that is used to program it!

Note: This article deals with the IDE on Windows. Other operating systems may differ!

Download the IDE

First, you must download the IDE and install it. Start by visiting Arduino’s software page. The IDE is available for most common operating systems, including Windows, Mac OS X, and Linux, so be sure to download the correct version for your OS. If you are using Windows 7 or older, do not download the Windows app version, as this requires Windows 8.1 or Windows 10.

Once the installer has downloaded, go ahead and install the IDE. Chances are you will want to enable all options on the installer, including any USB drivers and libraries, but do make sure to read the EULA!

The Arduino IDE

The Arduino IDE is incredibly minimalistic, yet it provides a near-complete environment for most Arduino-based projects. The top menu bar has the standard options, including “File” (new, load save, etc.), “Edit” (font, copy, paste, etc.), “Sketch” (for compiling and programming), “Tools” (useful options for testing projects), and “Help”. The middle section of the IDE is a simple text editor that where you can enter the program code. The bottom section of the IDE is dedicated to an output window that is used to see the status of the compilation, how much memory has been used, any errors that were found in the program, and various other useful messages.

Image of The Arduino IDE in its default state

The Arduino IDE in its default state

Projects made using the Arduino are called sketches, and such sketches are usually written in a cut-down version of C++ (a number of C++ features are not included). Because programming a microcontroller is somewhat different from programming a computer, there are a number of device-specific libraries (e.g., changing pin modes, output data on pins, reading analog values, and timers). This sometimes confuses users who think Arduino is programmed in an “Arduino language.” However, the Arduino is, in fact, programmed in C++. It just uses unique libraries for the device.

The 6 Buttons

While more advanced projects will take advantage of the built-in tools in the IDE, most projects will rely on the six buttons found below the menu bar.

Image of The button bar

The button bar

  1. The check mark is used to verify your code. Click this once you have written your code.
  2. The arrow uploads your code to the Arduino to run.
  3. The dotted paper will create a new file.
  4. The upward arrow is used to open an existing Arduino project.
  5. The downward arrow is used to save the current file.
  6. The far right button is a serial monitor, which is useful for sending data from the Arduino to the PC for debugging purposes.

Conclusion

There are plenty of other features available to consider on the IDE. But, having used many different types of microcontrollers and having been involved in multiple programming environments, it is shocking how simple the Arduino and its IDE is! In less than two minutes, you can get a simple C++ program uploaded onto the Arduino and have it running.

TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum