forked from REVrobotics/Blinkin-Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PWM_4_Color1_2.ino
43 lines (36 loc) · 1.39 KB
/
PWM_4_Color1_2.ino
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
43
void colorwaves_Team() { colorwaves(teamPalette); }
void drawTwinkles_Team() { drawTwinkles(teamPalette); }
void rainbow_Team() { rainbow(teamPalette); }
void bpm_Team() { bpm(teamPalette); }
void sinelon_Team() { sinelon(teamPalette); }
void EndtoEndBlend() {
uint8_t speed = beatsin8(6,0,255);
CRGB endclr = blend(colorList[COLOR1], colorList[COLOR2], speed);
CRGB midclr = blend(colorList[COLOR2], colorList[COLOR1], speed);
fill_gradient_RGB(leds, 0, endclr, stripLength/2, midclr);
fill_gradient_RGB(leds, stripLength/2+1, midclr, stripLength-1, endclr);
}
void EndtoEndStaticBlend() {
fill_gradient_RGB(leds, 0, colorList[COLOR1], stripLength/2, colorList[COLOR2]);
fill_gradient_RGB(leds, stripLength/2+1, colorList[COLOR2], stripLength-1, colorList[COLOR1]);
}
void teamSparkle() {
if (addressableStrip == true) {
fill_solid( leds, stripLength, colorList[COLOR1]);
fadeToBlackBy( leds, stripLength, 100);
addGlitter(255, colorList[COLOR2]);
}
else {
showAnalogRGB( colorList[COLOR1] );
}
}
void teamSparkleinv() {
if (addressableStrip == true) {
fill_solid( leds, stripLength, colorList[COLOR2]);
fadeToBlackBy( leds, stripLength, 100);
addGlitter(255, colorList[COLOR1]);
}
else {
showAnalogRGB( colorList[COLOR2] );
}
}