From 70f47e8668d691c833d5acc9a42921721bc3df6c Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 4 Jan 2023 10:05:04 +0100 Subject: [PATCH] Read button state during setup --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index c91c3b0..ae78d9e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -174,6 +174,7 @@ void setup() display.display(); pinMode(BUTTON, INPUT_PULLUP); + buttonLastState = digitalRead(BUTTON); // Setup SPIFFS if (!SPIFFS.begin())