Display WiFi connection details

This commit is contained in:
Correl Roush 2023-01-19 23:00:07 -05:00
parent 4d828e874e
commit f4c1e163af

View file

@ -7,6 +7,7 @@ const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD"; const char* password = "REPLACE_WITH_YOUR_PASSWORD";
AsyncWebServer server(80); AsyncWebServer server(80);
M5EPD_Canvas canvas(&M5.EPD);
void setup(void) { void setup(void) {
Serial.begin(115200); Serial.begin(115200);
@ -38,6 +39,12 @@ void setup(void) {
M5.TP.SetRotation(90); M5.TP.SetRotation(90);
M5.EPD.SetRotation(90); M5.EPD.SetRotation(90);
M5.EPD.Clear(true); M5.EPD.Clear(true);
M5.RTC.begin();
canvas.createCanvas(400, 300);
canvas.setTextSize(3);
canvas.drawString(ssid, 0, 0);
canvas.drawString(WiFi.localIP().toString(), 0, 20);
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4);
} }
void loop() void loop()