added template

This commit is contained in:
Simon Schmidt 2021-06-10 18:47:55 +02:00
parent e788da384f
commit 86c4a1bb48
4 changed files with 23 additions and 6 deletions

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# wifi credentials
need to create wifi_credentials.h from template.h

10
include/template.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef __WIFI_CREDENTIALS_H
#define __WIFI_CREDENTIALS_H
#ifndef STASSID
#define STASSID "ssid"
#define STAPSK "key"
#endif
#endif // __WIFI_CREDENTIALS_H

View File

@ -13,4 +13,11 @@ platform = espressif8266
board = esp01_1m board = esp01_1m
framework = arduino framework = arduino
; stuff for OTA
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update
upload_protocol = espota
upload_port = 192.168.10.94
upload_flags =
--port=8266
--auth=admin

View File

@ -110,14 +110,12 @@ void setup() {
ESP.restart(); ESP.restart();
} }
// Port defaults to 8266 // setup OTA
// ArduinoOTA.setPort(8266); ArduinoOTA.setPort(8266);
ArduinoOTA.setHostname("ESP_Treppenlicht");
// Hostname defaults to esp8266-[ChipID]
ArduinoOTA.setHostname("myesp8266");
// No authentication by default // No authentication by default
// ArduinoOTA.setPassword("admin"); ArduinoOTA.setPassword("admin");
// Password can be set with it's md5 value as well // Password can be set with it's md5 value as well
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3 // MD5(admin) = 21232f297a57a5a743894a0e4a801fc3