> For the complete documentation index, see [llms.txt](https://monasheng.gitbook.io/zerotohero/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://monasheng.gitbook.io/zerotohero/arduino-zero-to-hero/arduino-ide.md).

# Arduino IDE

{% embed url="<https://www.youtube.com/watch?v=-WM9kc-iVrg>" %}

## Arduino IDE

The Arduino organisation provides a bespoke *integrated development environment* (IDE) for managing your MCU and communicating with it, as well as writing and flashing code.

## Download and Installation

You can download the latest version of the Arduino Desktop IDE for Windows, Mac, or Linux from the official site:

{% embed url="<https://www.arduino.cc/en/software>" %}
The Arduino IDE can be downloaded from the Software section of the official Arduino website.
{% endembed %}

After downloading, follow the prompts to complete the installation process. Installation of the IDE and/or plugging in your board will also install the necessary drivers to use your MCU.

{% hint style="danger" %}
:zap: **Warning:** Arduino also provides a cloud-based version of the IDE for those who cannot install software.&#x20;

**Use of a browser-based IDE can create additional challenges for new users, and is not recommended for this module.**
{% endhint %}

## IDE Overview

### Coding Window

In the centre of the IDE is a large, open window where you can write your code. The window provides syntax highlighting, line numbers, and a range of auto-formatting options when you right-click.

<figure><img src="/files/AaKJtl5aIPoAeChPlrNU" alt=""><figcaption></figcaption></figure>

### Sketchbook

Along the sidebar on the left-hand-side of the coding window, the Sketchbook (folder icon) provides a convenient way to navigate through your sketches. You can also always use `File -> Open...` to manually locate Arduino `.ino` sketch files via the file explorer.

More information about Arduino code structure is provided in [Arduino C](/zerotohero/arduino-zero-to-hero/arduino-programming/arduino-c.md).

<figure><img src="/files/HmsLG7Gd3Zv5xwMZJcs5" alt=""><figcaption></figcaption></figure>

### Boards Manager

Below the sketchbook, the Boards Manager icon will open up a dialogue where you can browse and install the drivers needed for your particular Arduino MCU. The manager provides a search bar where you can look for your particular board and an install button to trigger the installation.

The default-installed `Arudino AVR Boards` package includes support for the Arduino Mega used in this module.

<figure><img src="/files/GjUj3n8BhetNW6ygVPiZ" alt=""><figcaption></figcaption></figure>

### Library Manager

Below the boards manager, the Library Manager allows you to install custom, pre-written code libraries - which provide more functionality to your Arduino board without you having to write heaps of complicated code. As with the board manager, you can search and install these libraries from the pop-up dialogue.

<figure><img src="/files/AL3CqvjgP9IV3BEuEZ2q" alt=""><figcaption></figcaption></figure>

### Serial Monitor

Along the bottom of the screen (or opened via `Tools -> Serial Monitor` if not visibile), the [Serial Monitor](/zerotohero/arduino-zero-to-hero/core-skills/serial-monitor.md) provides a small window where you can communicate with your Arduino board - e.g. to have it report the value of a variable or a sensor reading while it is running. The monitor allows you to control the communication parameters as well (namely, how to interpret new-line characters, and what *Baud Rate* to use for the communications).

We will touch more on the [Serial Monitor](/zerotohero/arduino-zero-to-hero/core-skills/serial-monitor.md) when we learn to use it in [Core Skills](/zerotohero/arduino-zero-to-hero/core-skills.md).

<figure><img src="/files/FFY2QiFlKskIBso5GEfT" alt=""><figcaption></figcaption></figure>

### Flashing Interface

Along the top of the screen are three buttons that make up the interface for loading code onto your board (a process known as *flashing*):

1. The Select Board and Port dropdown allows you to choose which Arduino board you are flashing code to. This is needed as you might have several different models of Arduino boards, or several of the same model board connected at once.
2. The verify button (a tick) will attempt to compile your Arduino code, which can reveal errors/bugs that you need to fix before you can flash.
3. The flash button (an arrow) will load your code onto your connected Arduino board if it has been verified. It not, it will run the verifier first before flashing.

We will touch more on [Flashing Code](/zerotohero/arduino-zero-to-hero/core-skills/flashing-code.md) when we learn to do it in [Core Skills](/zerotohero/arduino-zero-to-hero/core-skills.md).

<figure><img src="/files/wuapghh0dxsiDE1CeGwF" alt=""><figcaption></figcaption></figure>

### Further Information

{% embed url="<https://docs.arduino.cc/software/ide-v2/tutorials/getting-started-ide-v2/>" %}
The offical Arduino documentation for getting started with the IDE.
{% endembed %}
