Minor Wifi feather updates

This commit is contained in:
Vegar Westerlund 2019-06-07 22:51:00 +02:00
parent 643c9a5e20
commit 605eac8996
3 changed files with 9 additions and 9 deletions

View File

@ -28,13 +28,11 @@ void setup() {
delay(100);
// Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
//Serial.begin(9600);
//while (!Serial) ; // wait for serial port to connect. Needed for native USB port only
// Uncomment to debug over uart
debugger = &Serial;
//debugger = &Serial;
if (debugger) debugger->print("Unwantingly wait 5"); // Allow programming during restart
delay(1000);
@ -62,7 +60,7 @@ void setup() {
while (true);
}
//connect_wifi();
connect_wifi();
hanReader.setup(&Serial1, debugger);

View File

@ -1,3 +1,3 @@
#define SECRET_SSID ""
#define SECRET_PASS ""
#define AUTH_HEADER "Basic [base64-user:pass-string]"
#define SECRET_SSID "flyndrefisken"
#define SECRET_PASS "dzwe.lzgq.ztzs"
#define AUTH_HEADER "Basic dmVnYXJ3ZTpmaXNrZW4="

View File

@ -36,6 +36,7 @@ void connect_wifi() {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
WiFi.disconnect();
int status = WiFi.begin(ssid, pass);
if (status == WL_CONNECTED) {
@ -45,6 +46,7 @@ void connect_wifi() {
// wait 1 seconds for connection:
Serial.print("Waiting 1 before trying again. status: ");
Serial.println(status);
yield();
delay(1000);
}