mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Add httpupdate lib import in ota example (#8667)
Docs doesn't include any reference to include <ESP8266httpUpdate.h> library in Advanced OTA Updater section. It took me some time to find out while reading the docs
This commit is contained in:
parent
8e79833db6
commit
9cd560b451
@ -523,6 +523,8 @@ Simple updater downloads the file every time the function is called.
|
|||||||
|
|
||||||
.. code:: cpp
|
.. code:: cpp
|
||||||
|
|
||||||
|
#include <ESP8266httpUpdate.h>
|
||||||
|
|
||||||
WiFiClient client;
|
WiFiClient client;
|
||||||
ESPhttpUpdate.update(client, "192.168.0.2", 80, "/arduino.bin");
|
ESPhttpUpdate.update(client, "192.168.0.2", 80, "/arduino.bin");
|
||||||
|
|
||||||
@ -535,6 +537,8 @@ The server-side script can respond as follows: - response code 200, and send the
|
|||||||
|
|
||||||
.. code:: cpp
|
.. code:: cpp
|
||||||
|
|
||||||
|
#include <ESP8266httpUpdate.h>
|
||||||
|
|
||||||
WiFiClient client;
|
WiFiClient client;
|
||||||
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
|
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
|
||||||
switch(ret) {
|
switch(ret) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user