The Arduino IDE

The Arduino Integrated Development Environment (or Arduino IDE) allows you to write a sketch, compile the sketch, upload the sketch to a board connected to the computer via an USB cable, send data to the board and read the output from the board.

Sketches are written in the text editor and are saved with the file extension .ino. The Arduino IDE supports the most commonly used boards and even includes sample sketches for each board that can be used as a starting point for writing your sketches or only to test the board.

The following steps should be followed when creating a sketch using the IDE features and functions:

  • Write the Sketch

The editor has the usual features of any text editor for writing code and editing it. The message area gives feedback while saving and exporting and also displays errors. The console displays text output by the Arduino Software (IDE), including complete error messages and other information. The bottom righthand corner of the window displays the configured board and serial port. The toolbar buttons allow you to verify and upload programs, create, open, save sketches, and open the serial monitor.

  • Connect a board to the Computer

When the board is connected to the computer it shows up in the list of boards. It also shows a list of serial ports on the computer to which the board is connected.

  • Select an Arduino Board

Before compiling a sketch, the Arduino board that it is intended to run on must be selected. Select the serial port the board is connected to. The computer and the board use the serial port to which the USB cable is connected to upload the sketch and exchange input and output data.

  • Compile the Sketch

Once a sketch has been written using the editor, it can be compiled. And if any error is displayed in the message area of the IDE, then shows an error or a compilation success message is displayed.

  • Upload the Sketch

Once the sketch is compiled successfully, it can be uploaded to the connected Arduino board.

  • Check the output on the Serial Monitor

Once the sketch has been uploaded, it opens the Serial Monitor from the IDE. Instructions that ask the board to print data to the serial monitor will show up here.