Turn off AP, allow setting hostname

Fixes #50
This commit is contained in:
Marcel Stör
2018-04-15 00:10:34 +02:00
parent 109e26b2b9
commit b154356c33
2 changed files with 3 additions and 0 deletions

View File

@@ -130,7 +130,9 @@ bool canBtnPress;
void connectWifi() {
if (WiFi.status() == WL_CONNECTED) return;
//Manual Wifi
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID,WIFI_PASS);
WiFi.hostname(WIFI_HOSTNAME);
int i = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(500);

View File

@@ -23,6 +23,7 @@ See more at http://blog.squix.ch
// Setup
#define WIFI_SSID "yourssid"
#define WIFI_PASS "yourpassw0rd"
#define WIFI_HOSTNAME "ThingPulse-weather-station-color"
const int UPDATE_INTERVAL_SECS = 15 * 60; // Update every 10 minutes
const int SLEEP_INTERVAL_SECS = 0; // Going to Sleep after idle times, set 0 for dont sleep