|
|
@@ -1,8 +1,8 @@ |
|
|
|
### Steps to run it |
|
|
|
### __How-To use this Project__ |
|
|
|
|
|
|
|
https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html |
|
|
|
|
|
|
|
##### create "include/wifi_credentials.h" |
|
|
|
1. Download and install [Visual Studio Code](https://code.visualstudio.com/download) |
|
|
|
2. Install [PlatformIO IDE extension](https://platformio.org/install/ide?install=vscode) for Visual Studio Code |
|
|
|
3. Create [wifi_credentials.h](include/wifi_credentials.h) from [templ_wifi_credentials.h](include/templ_wifi_credentials.h) in include/ |
|
|
|
|
|
|
|
```cpp |
|
|
|
#ifndef __WIFI_CREDENTIALS_H |
|
|
@@ -16,24 +16,30 @@ https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html |
|
|
|
#endif // __WIFI_CREDENTIALS_H |
|
|
|
``` |
|
|
|
|
|
|
|
##### platformio.ini |
|
|
|
see templ_platformio_ini |
|
|
|
|
|
|
|
```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 |
|
|
|
4. Create [platformio.ini](platformio.ini) from [templ_platformio_ini](templ_platformio_ini) |
|
|
|
|
|
|
|
```bash |
|
|
|
$ cp templ_platformio_ini platformio.ini |
|
|
|
``` |
|
|
|
|
|
|
|
5. __Uploading new firmware__ |
|
|
|
```bash |
|
|
|
# upload program via ota |
|
|
|
$ pio run -t upload |
|
|
|
# upload file system via ota |
|
|
|
$ pio run -t uploadfs |
|
|
|
|
|
|
|
# upload program via Serial Port |
|
|
|
# Serial Port needs to be selected in platformio.ini |
|
|
|
$ pio run -t upload -e serial |
|
|
|
# upload file system via Serial Port |
|
|
|
$ pio run -t uploadfs -e serial |
|
|
|
``` |
|
|
|
|
|
|
|
------ |
|
|
|
|
|
|
|
Additional used sources and libraries in this project and [DOKU.md](DOKU.md) |
|
|
|
- https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html |
|
|
|
- https://github.com/NachtRaveVL/PCA9685-Arduino |
|
|
|
- https://arduino-esp8266.readthedocs.io/en/latest/gdb.html |
|
|
|
- check different environments inside [platformio.ini](platformio.ini) |