From 035db63e6f50b3f05fd332b82efec6b6c178444a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 11 Oct 2023 10:08:41 +0200 Subject: tighten serial handling --- main.ino | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.ino b/main.ino index ee926bf..571bfe0 100644 --- a/main.ino +++ b/main.ino @@ -35,6 +35,10 @@ EasyButton button_select(BUTTON_PIN_SELECT); void setup() { Serial.begin(BAUDRATE); + while (!Serial) { + ; + } + Serial.println(); button_move.begin(); button_select.begin(); @@ -52,15 +56,15 @@ void loop() { } void onButtonMovePressed() { - Serial.print("button MOVE clicked"); + Serial.println("button MOVE clicked"); } void onButtonMoveLongpressed() { - Serial.print("button MOVE long-clicked"); + Serial.println("button MOVE long-clicked"); } void onButtonSelectPressed() { - Serial.print("button SELECT clicked"); + Serial.println("button SELECT clicked"); } /* -- cgit v1.2.3