endSequence
This commit is contained in:
parent
1561f48d1a
commit
63a2b7f23d
41
src/main.cpp
41
src/main.cpp
@ -36,6 +36,43 @@ void updateTime() {
|
|||||||
|
|
||||||
bool running = true;
|
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() {
|
void showTime() {
|
||||||
if (!running) {
|
if (!running) {
|
||||||
return;
|
return;
|
||||||
@ -45,10 +82,8 @@ void showTime() {
|
|||||||
drawMillis(pixels, rest, color);
|
drawMillis(pixels, rest, color);
|
||||||
} else {
|
} else {
|
||||||
running = false;
|
running = false;
|
||||||
pixels.clear();
|
|
||||||
drawNumber(pixels, 3, 0, true, RED);
|
|
||||||
pixels.show();
|
|
||||||
Serial.println("END");
|
Serial.println("END");
|
||||||
|
endSequence();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user