added template
This commit is contained in:
parent
e788da384f
commit
86c4a1bb48
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# wifi credentials
|
||||
need to create wifi_credentials.h from template.h
|
10
include/template.h
Normal file
10
include/template.h
Normal 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
|
@ -13,4 +13,11 @@ platform = espressif8266
|
||||
board = esp01_1m
|
||||
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
|
||||
|
||||
|
10
src/main.cpp
10
src/main.cpp
@ -110,14 +110,12 @@ void setup() {
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
// Port defaults to 8266
|
||||
// ArduinoOTA.setPort(8266);
|
||||
|
||||
// Hostname defaults to esp8266-[ChipID]
|
||||
ArduinoOTA.setHostname("myesp8266");
|
||||
// setup OTA
|
||||
ArduinoOTA.setPort(8266);
|
||||
ArduinoOTA.setHostname("ESP_Treppenlicht");
|
||||
|
||||
// No authentication by default
|
||||
// ArduinoOTA.setPassword("admin");
|
||||
ArduinoOTA.setPassword("admin");
|
||||
|
||||
// Password can be set with it's md5 value as well
|
||||
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
|
||||
|
Loading…
x
Reference in New Issue
Block a user