-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnutcrackerPattern.h
42 lines (41 loc) · 1.62 KB
/
nutcrackerPattern.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const unsigned long red = 0xFF0000;
const unsigned long green = 0x32FF00;
const unsigned long white = 0xFFFFFF;
void doNutcrackerFlash() {
for (int i = 0; i < 5; i++) {
CircuitPlayground.clearPixels();
CircuitPlayground.setPixelColor(0, red);
CircuitPlayground.setPixelColor(1, green);
CircuitPlayground.setPixelColor(2, white);
CircuitPlayground.setPixelColor(3, red);
CircuitPlayground.setPixelColor(4, green);
CircuitPlayground.setPixelColor(5, white);
CircuitPlayground.setPixelColor(6, red);
CircuitPlayground.setPixelColor(7, green);
CircuitPlayground.setPixelColor(8, white);
CircuitPlayground.setPixelColor(9, red);
delay(1000);
CircuitPlayground.setPixelColor(0, green);
CircuitPlayground.setPixelColor(1, white);
CircuitPlayground.setPixelColor(2, red);
CircuitPlayground.setPixelColor(3, green);
CircuitPlayground.setPixelColor(4, white);
CircuitPlayground.setPixelColor(5, red);
CircuitPlayground.setPixelColor(6, green);
CircuitPlayground.setPixelColor(7, white);
CircuitPlayground.setPixelColor(8, red);
CircuitPlayground.setPixelColor(9, green);
delay(1000);
CircuitPlayground.setPixelColor(0, white);
CircuitPlayground.setPixelColor(1, red);
CircuitPlayground.setPixelColor(2, green);
CircuitPlayground.setPixelColor(3, white);
CircuitPlayground.setPixelColor(4, red);
CircuitPlayground.setPixelColor(5, green);
CircuitPlayground.setPixelColor(6, white);
CircuitPlayground.setPixelColor(7, red);
CircuitPlayground.setPixelColor(8, green);
CircuitPlayground.setPixelColor(9, white);
delay(1000);
}
}