Arduino IDE
Arduino IDE
The Arduino IDE is an open-source software, which is used to write and upload
code to the Arduino boards. The IDE application is suitable for different operating
systems such as Windows, Mac OS X, and Linux. It supports the programming
languages C and C++. Here, IDE stands for Integrated Development Environment.
The program or code written in the Arduino IDE is often called as sketching. We
need to connect the Arduino board with the IDE to upload the sketch written in
the Arduino IDE software. The sketch is saved with the extension '.ino'.
The Arduino IDE will appear as:
Toolbar Button
The icons displayed on the toolbar are New, Open, Save, Upload, and Verify.
It is shown below:
Upload
The Upload button compiles and runs our code written on the screen. It further
uploads the code to the connected board. Before uploading the sketch, we need
to make sure that the correct board and ports are selected.
We also need a USB connection to connect the board and the computer. Once all
the above measures are done, click on the Upload button present on the toolbar.
The latest Arduino boards can be reset automatically before beginning with
Upload. In the older boards, we need to press the Reset button present on it. As
soon as the uploading is done successfully, we can notice the blink of the Tx and
Rx LED.
If the uploading is failed, it will display the message in the error window.
We do not require any additional hardware to upload our sketch using the
Arduino Bootloader. A Bootloader is defined as a small program, which is loaded
in the microcontroller present on the board. The LED will blink on PIN 13.
Open
The Open button is used to open the already created file. The selected file will be
opened in the current window.
Save
The save button is used to save the current sketch or code.
New
It is used to create a new sketch or opens a new window.
Verify
The Verify button is used to check the compilation error of the sketch or the
written code.
Serial Monitor
The serial monitor button is present on the right corner of the toolbar. It opens
the serial monitor.
It is shown below:
When we connect the serial monitor, the board will reset on the operating system
Windows, Linux, and Mac OS X. If we want to process the control characters in our
sketch, we need to use an external terminal program. The terminal program
should be connected to the COM port, which will be assigned when we connect
the board to the computer.
Menu Bar
File Menu
When we click on the File button on the Menu bar, a drop-down list will appear. It
is shown below:
Comment/Uncomment
The Comment/ Uncomment button is used to put or remove the comment mark
(//) at the beginning of the specified line.
Increase Indent
It is used to add the space at the starting of the specified line. The spacing moves
the text towards the right.
Decrease Indent
It is used to subtract or remove the space at the starting of the specified line. The
spacing moves the text towards the left.
Increase Font Size
It increases the font size of the written text.
Decrease Font Size
It decreases the font size of the written text.
Find...
It is used to find the specified text. We can also replace the text. It highlights the
text in the sketch.
The window will appear as:
Find Next
It highlights the next word, which has specified in the 'Find...' window. If there is
no such word, it will not show any highlighted text.
Find Previous
It highlights the previous word, which has specified in the 'Find...' window. If there
is no such word, it will not show any highlighted text.
Sketch Menu
When we click on the Sketch button on the Menu bar, a drop-down list appears. It
is shown below:
We can also delete the corresponding file from the tab by clicking on the small
triangle -> Delete option.
Tools Menu
When we click on the Tools button on the Menu bar, a drop-down list appears. It is
shown below:
The Help section includes several documents that are easy to access, which comes
along with the Arduino IDE. It consists of the number of options such as Getting
Started, Environment, Troubleshooting, Reference, etc. We can also consider the
image shown above, which includes all the options under the Help section.