如何在 PlatformIO 上为 ESP8266/ESP32 安装 ArduinoOTA (platformio.ini 和 lib_deps)
由于 ESP Arduino 框架已经包含 ArduinoOTA,无需显式安装或要求 ArduinoOTA。
你不需要在 platformio.ini 或 lib_deps 中添加任何内容即可在 ESP8266 或 ESP32 上使用 ArduinoOTA。
为了使用 ArduinoOTA,你至少需要包含它:
include_arduinoota.h
#include <ArduinoOTA.h>然后调用
arduinoota_begin.cpp
ArduinoOTA.begin();in your setup() function and 然后调用
arduinoota_handle.cpp
ArduinoOTA.handle();定期(例如,在你的 loop() 函数中)。
有关更完整的示例,请参见:
Check out similar posts by category:
ESP8266/ESP32, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow