1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-12 09:20:39 +00:00

ESP8266 Compatibility, finally

This commit is contained in:
2017-12-01 17:11:16 +01:00
parent 489ba045fb
commit 479792e335
3 changed files with 36 additions and 14 deletions

View File

@ -1,7 +1,12 @@
#include <ESPUI.h>
#include <WiFi.h>
const char *ssid = "ESP32";
#if defined(ESP32)
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
const char *ssid = "ESPUI";
const char *password = "";
long oldTime = 0;
@ -10,7 +15,13 @@ bool switchi = false;
void setup(void) {
Serial.begin(115200);
WiFi.mode(WIFI_AP);
WiFi.setHostname(ssid);
#if defined(ESP32)
WiFi.setHostname(ssid);
#else
WiFi.hostname(ssid);
#endif
WiFi.softAP(ssid);
// WiFi.softAP(ssid, password);
Serial.println("");