How to install ArduinoOTA for ESP8266/ESP32 on PlatformIO (platformio.ini and lib_deps)

As the ESP Arduino framework already includes ArduinoOTA, there is no need to explicitly install or require ArduinoOTA.

You do not need to add anything to platformio.ini or lib_deps in order to use ArduinoOTA on the ESP8266 or ESP32.

In order to use ArduinoOTA, the minimum you need to to is to include it:

include_arduinoota.h
#include <ArduinoOTA.h>

then call

arduinoota_begin.cpp
ArduinoOTA.begin();

in your setup() function and then call

arduinoota_handle.cpp
ArduinoOTA.handle();

periodically (for example, in your loop() function).

For a more complete example, see:


Check out similar posts by category: ESP8266/ESP32, PlatformIO