Wifi switch, but not working ;-(
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
#include <avr/wdt.h>
|
||||
|
||||
|
||||
|
||||
const uint8_t WIFI_ENABLE_PIN = 4;
|
||||
|
||||
|
||||
LiquidCrystal lcd = LiquidCrystal(A0, A1, A2, A3, A4, A5);
|
||||
@ -68,6 +68,11 @@ void printWifiStatus() {
|
||||
}
|
||||
|
||||
void setup() {
|
||||
pinMode(WIFI_ENABLE_PIN, INPUT_PULLUP);
|
||||
delay(100);
|
||||
wifiEnabled = true; // (digitalRead(WIFI_ENABLE_PIN) != 0);
|
||||
|
||||
|
||||
Serial.begin(57600);
|
||||
while (!Serial) {
|
||||
; // wait for serial port to connect. Needed for Leonardo only
|
||||
@ -169,6 +174,8 @@ void updateDisplay() {
|
||||
uint8_t wifiStatus = WiFi.status();
|
||||
lcd.print(wifiStatus);
|
||||
lcd.print(disconnectState);
|
||||
} else {
|
||||
lcd.print("no wifi");
|
||||
}
|
||||
|
||||
lcd.setCursor(0, 1);
|
||||
|
Reference in New Issue
Block a user