Skip to content

Commit d72db04

Browse files
committed
fixup! fix: keyword-spotting
1 parent 8c6518b commit d72db04

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

examples/keyword-spotting/sketch/heart_frames.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
* SPDX-License-Identifier: MPL-2.0
55
*/
66

7-
const uint32_t HeartStatic[4] = {0x00006c04, 0x90208088, 0x02800800,
8-
0x00000000};
7+
const uint32_t HeartStatic[4] = {
8+
0x00006c04,
9+
0x90208088,
10+
0x02800800,
11+
0x00000000,
12+
};
913

1014
const uint32_t HeartAnim[][5] = {
1115
{0x1dc11108, 0x08404104, 0x04401400, 0x40000000, 55}, // 1

examples/keyword-spotting/sketch/sketch.ino

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,22 @@
99

1010
Arduino_LED_Matrix matrix;
1111

12-
bool awake = false;
13-
1412
void setup() {
1513
matrix.begin();
1614
matrix.clear();
17-
1815
matrix.loadFrame(HeartStatic);
1916

2017
Bridge.begin();
2118
Bridge.provide("keyword_detected", wake_up);
2219
}
2320

24-
void loop() {
25-
if (awake) {
26-
matrix.loadSequence(HeartAnim);
27-
matrix.playSequence();
28-
delay(1000);
29-
matrix.loadFrame(HeartStatic);
30-
awake = false;
31-
}
32-
}
21+
void loop() {}
22+
23+
void wake_up() {
24+
matrix.loadSequence(HeartAnim);
25+
matrix.playSequence();
3326

34-
void wake_up() { awake = true; }
27+
delay(1000);
28+
29+
matrix.loadFrame(HeartStatic);
30+
}

0 commit comments

Comments
 (0)