ClavdaClavda

Connect an ESP32 to Clavda: Arduino IDE, PlatformIO or ESP-IDF

The ClavdaOTA library gives an ESP32 over-the-air updates, a remote Serial Monitor and a live dashboard, from anywhere. Choose the guide for how you build: Arduino IDE, PlatformIO or ESP-IDF, in C or C++.

Updated 2 min read

An ESP32 does not run the Clavda agent. It runs the ClavdaOTA library inside your own firmware, which connects the board to Clavda over Wi-Fi. Once it is connected, from anywhere, you can:

  • update its firmware over the air, with no cable,
  • watch its serial output and type commands back,
  • build a live dashboard of its readings and controls.

It works on the ESP32, ESP32-S2, S3, C3 and C6. Like every Clavda device, the board dials out to the relay, so it needs no public address and no port forwarding.

Choose how you build

Each guide is complete on its own: setup, over-the-air updates, the Serial Monitor and the dashboard, with every program in C and in C++.

How they differ

Arduino IDEPlatformIOESP-IDF
FrameworkArduino core 3.xESP-IDFESP-IDF 5 or later
The program startsin setup() and loop()in app_main()in app_main()
The library froma ZIP, and ArduinoJson from the Library Managersrc/idf_component.ymlmain/idf_component.yml
Room for updatesTools → Partition Schemepartitions.csv in platformio.inipartitions.csv and sdkconfig.defaults
The file to upload<sketch>.ino.bin.pio/build/<env>/firmware.binbuild/<project>.bin

C or C++

The library has a C++ API, ClavdaOTA, ClavdaSerial and ClavdaWidget, and a C API, the clavda_* functions, with the same features. The file decides which one you get: ClavdaOTA.h gives C++ in a .cpp or .ino file, and C in a .c file. Each guide shows both, so pick the language you write.

What you need

  • An ESP32 board and a USB cable, for the first flash only.
  • A 2.4 GHz Wi-Fi network the board can join.
  • A Clavda account. See Before you start.