Browse Source

added template

tags/v0.1.0
Simon Schmidt 2 years ago
parent
commit
86c4a1bb48
4 changed files with 23 additions and 6 deletions
  1. 2
    0
      README.md
  2. 10
    0
      include/template.h
  3. 7
    0
      platformio.ini
  4. 4
    6
      src/main.cpp

+ 2
- 0
README.md View File

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

+ 10
- 0
include/template.h 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

+ 7
- 0
platformio.ini View File

@@ -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


+ 4
- 6
src/main.cpp View File

@@ -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…
Cancel
Save