-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathFxSolid.ino
More file actions
36 lines (28 loc) · 743 Bytes
/
Copy pathFxSolid.ino
File metadata and controls
36 lines (28 loc) · 743 Bytes
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
//StripInvader (c) 2011 Michael Vogt <michu@neophob.com> // pixelinvaders.ch
//
//Solid color effects
//mode 0: solid white color
//mode 1: wheel color
uint8_t solidmode;
void setupSolid(uint8_t _mode) {
solidmode = _mode;
}
void loopSolid() {
switch (solidmode) {
case 0:
fillAllPixelWith(WHITE_COLOR);
break;
case 1:
fillAllPixelWith(Wheel(frames%255));
break;
case 2:
//we get back to this fx AFTER the whole fading is done!
startFadeToRandomColor(random(255), random(255), random(255));
break;
}
}
void fillAllPixelWith(uint32_t col) {
for (uint16_t i=0; i < strip.numPixels(); i++) {
setTintPixelColor(i, col);
}
}