added black boxes for the connection and location strings when they update
This commit is contained in:
@@ -40,6 +40,7 @@ void setup()
|
|||||||
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT);
|
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT);
|
||||||
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT);
|
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT);
|
||||||
|
|
||||||
|
tft.drawString("Not using WiFi", 10, 10);
|
||||||
WiFi.begin(ssid, pw);
|
WiFi.begin(ssid, pw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +104,7 @@ void displayInfo()
|
|||||||
if((WiFi.status() == WL_CONNECTED))
|
if((WiFi.status() == WL_CONNECTED))
|
||||||
{
|
{
|
||||||
String wifi_text = "Connected to WiFi: " + String(ssid);
|
String wifi_text = "Connected to WiFi: " + String(ssid);
|
||||||
|
tft.fillRect(10, 10, 250, 20, TFT_BLACK);
|
||||||
tft.drawString(wifi_text, 10, 10);
|
tft.drawString(wifi_text, 10, 10);
|
||||||
api_lookup();
|
api_lookup();
|
||||||
}
|
}
|
||||||
@@ -132,6 +134,7 @@ void api_lookup()
|
|||||||
String name = doc["name"];
|
String name = doc["name"];
|
||||||
String state = doc["state"];
|
String state = doc["state"];
|
||||||
String loc_text = name + ", " + state;
|
String loc_text = name + ", " + state;
|
||||||
|
tft.fillRect(10, 80, 200, 20, TFT_BLACK);
|
||||||
tft.drawString(loc_text, 10, 80);
|
tft.drawString(loc_text, 10, 80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user