From 63a2b7f23d336a7ba8732f078dca5a5f33f7ebe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Wed, 12 Mar 2025 22:30:07 +0100 Subject: [PATCH] endSequence --- src/main.cpp | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 142c29c..f8f791f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,6 +36,43 @@ void updateTime() { bool running = true; +void dashes() { + pixels.clear(); + drawChar(pixels, 0, '-', true, RED); + drawChar(pixels, 1, '-', true, RED); + drawChar(pixels, 2, '-', true, RED); + drawChar(pixels, 3, '-', true, RED); + pixels.show(); +} + +void white() { + pixels.clear(); + drawChar(pixels, 0, '8', true, WHITE); + drawChar(pixels, 1, '8', true, WHITE); + drawDots(pixels, WHITE, WHITE, WHITE, WHITE); + drawChar(pixels, 2, '8', true, WHITE); + drawChar(pixels, 3, '8', true, WHITE); + pixels.show(); +} + +void black() { + pixels.clear(); + pixels.show(); +} + +void endSequence() { + for (int x = 0; x < 3; ++x) { + for (int i = 0; i < 2; ++i) { + white(); + delay(100); + black(); + delay(100); + } + dashes(); + delay(500); + } +} + void showTime() { if (!running) { return; @@ -45,10 +82,8 @@ void showTime() { drawMillis(pixels, rest, color); } else { running = false; - pixels.clear(); - drawNumber(pixels, 3, 0, true, RED); - pixels.show(); Serial.println("END"); + endSequence(); } }