From d772ecfa71aac9b88ef5f79c7f281a0169b622a2 Mon Sep 17 00:00:00 2001 From: Elizabeth Cray Date: Thu, 8 Jun 2023 00:04:08 -0400 Subject: [PATCH] Add OLED health function --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index dd28a3f..ddccf6f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,14 @@ void statusMsg(String msg){ }while ( disp.nextPage() ); } +void screenRefresh(){ + // Fill screen + disp.setDrawColor(0); + disp.drawBox(0, 0, 128, 64); + delay(20); + disp.setDrawColor(1); +} + void configModeCallback (WiFiManager *myWiFiManager) { Serial.println("Entered config mode"); statusMsg("Setup"); @@ -151,6 +159,10 @@ void loop(void) { disp.setDrawColor(1); drawUI(); drawProgress(); + if(millis() % 500 <= 2){ + Serial.println("Refreshing"); + screenRefresh(); + } }while ( disp.nextPage() ); // TODO: Replace this with data fetch