2021-06-10 18:56:45 +02:00
|
|
|
### Steps to run it
|
|
|
|
|
2021-06-10 20:06:58 +02:00
|
|
|
https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html
|
|
|
|
|
2021-06-10 19:21:55 +02:00
|
|
|
##### create "include/wifi_credentials.h"
|
2021-06-10 18:56:45 +02:00
|
|
|
|
|
|
|
```cpp
|
|
|
|
#ifndef __WIFI_CREDENTIALS_H
|
|
|
|
#define __WIFI_CREDENTIALS_H
|
|
|
|
|
|
|
|
#ifndef STASSID
|
|
|
|
#define STASSID "ssid"
|
|
|
|
#define STAPSK "key"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // __WIFI_CREDENTIALS_H
|
|
|
|
```
|
|
|
|
|
2021-06-10 18:58:20 +02:00
|
|
|
##### platformio.ini
|
2021-06-10 18:56:45 +02:00
|
|
|
change IP of esp8266 accordingly
|
|
|
|
IP gets printed on Serial Monitor after first Upload
|
2021-06-21 09:12:15 +02:00
|
|
|
|
|
|
|
```ini
|
|
|
|
[env:<BOARD>]
|
|
|
|
platform = espressif8266
|
|
|
|
board = <BOARD>
|
|
|
|
framework = arduino
|
|
|
|
monitor_speed = 115200
|
|
|
|
|
|
|
|
extra_scripts = pre:extra_script.py
|
|
|
|
|
|
|
|
; stuff for OTA
|
|
|
|
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update
|
|
|
|
upload_protocol = espota
|
|
|
|
upload_port = <IPADRESS>
|
|
|
|
upload_flags =
|
|
|
|
--port=8266
|
|
|
|
--auth=admin
|
|
|
|
|
|
|
|
lib_deps =
|
|
|
|
ottowinter/PCA9685 16-Channel PWM Driver Module Library @ 1.2.9
|
|
|
|
```
|
|
|
|
|