> ## Documentation Index
> Fetch the complete documentation index at: https://elatoai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Arduino IDE

> Your guide to using Arduino IDE for your Voice AI Projects

<Card title="Before you start" icon="lightbulb" href="blog/firmware">
  Make sure you follow the [Firmware guide](blog/firmware) first.
</Card>

## 1. Install Arduino IDE + ESP32 core

1. Download Arduino IDE: [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/)
2. Install the ESP32 boards package (Espressif)
   * Arduino IDE: `Preferences` -> `Additional boards manager URLs`
   * Add: `https://espressif.github.io/arduino-esp32/package_esp32_index.json`
   * `Tools` -> `Board` -> `Boards Manager` -> install **esp32 by Espressif Systems**

## 2. Open the firmware as an Arduino sketch

Arduino IDE expects an `.ino` entrypoint.

1. Create a new sketch folder (example: `elato_firmware/`)
2. Copy firmware sources into that folder (from `firmware-arduino/`)
3. Rename `main.cpp` to `elato_firmware.ino` (or create `elato_firmware.ino` and include/forward the setup/loop entrypoints)
4. Keep the other `*.cpp` and `*.h` files in the same sketch directory

## 3. Board + serial settings (match PlatformIO)

In Arduino IDE:

* In the Sidebar, head over to `Boards Manager` and select `Arduino ESP32 Boards by Ardiuno` version `2.0.18-arduino.5`
* `Tools` -> `Board` -> **ESP32S3 Dev Module** (or the closest match to `esp32-s3-devkitc-1`)
* `Tools` -> `Upload Speed` -> keep at 115200
* `Tools` -> `Port` -> select your ESP32
* `Tools` -> `PSRAM` -> enable if your board has it
* `Tools` -> `Partition Scheme` -> select a scheme that supports **16MB** flash (suggested: "Default 4MB with spiffs")
* `Tools` -> `Serial Monitor` speed: **115200**

## 4. Libraries (match `lib_deps` from `platformio.ini`)

### Install from Library Manager

Install these packages and versions:

* `ArduinoJson` (`^7.1.0`)
* `WebSockets` (`^2.4.1`)
* `ESPAsyncWebServer` by ESP32Async (`^3.7.6`)
* `ESPAsyncTCP` by ESP32Async (`^3.4.4`)
* `ESP32_Button` (`^0.0.1`)

### Install from GitHub (ZIP)

These are pulled from GitHub in PlatformIO; in Arduino IDE you can install them via:

`Sketch` -> `Include Library` -> `Add .ZIP Library...`

* `arduino-audio-tools` (tag `v1.0.1`): `https://github.com/pschatzmann/arduino-audio-tools`
* `arduino-libopus` (commit/tag `a1.1.0`): `https://github.com/pschatzmann/arduino-libopus`

## 5. Build + upload

1. `Sketch` -> `Verify/Compile`
2. `Sketch` -> `Upload`

If you get missing header/library errors, double-check the GitHub ZIP installs and restart Arduino IDE.

<Note>
  **Need help?** Join our [Discord](https://discord.gg/KJWxDPBRUj) community and to any questions and share ideas.
</Note>
