-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstartup.cpp
46 lines (39 loc) · 1.12 KB
/
startup.cpp
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
44
45
46
/*
* Copyright Ben XO https://github.com/ben-xo All rights reserved.
*/
#include "effects.h"
void do_banner() {
// colour test
for (uint16_t i = 0; i <= 255; i += STRIP_LENGTH/30) {
for (uint8_t j = 0; j < STRIP_LENGTH; j++) {
CRGB c = Wheel((j + (i/4)) * 255 / STRIP_LENGTH);
leds[j].setRGB(c.r * i / 255, c.g * i / 255, c.b * i / 255);
}
FastLED.show();
}
for (int16_t k = 255; k > -1; k -= STRIP_LENGTH/30) {
for (uint8_t j = 0; j < STRIP_LENGTH; j++) {
CRGB c = Wheel((j + (STRIP_LENGTH-k)/4) * 255 / STRIP_LENGTH);
leds[j].setRGB(c.r * k / 255, c.g * k / 255, c.b * k / 255);
}
FastLED.show();
}
FastLED.delay(100);
// double flash
for (uint8_t j = 0; j < STRIP_LENGTH; j++) {
leds[j].setRGB(255,255,255);
}
FastLED.show();
FastLED.delay(50);
FastLED.clear();
FastLED.show();
FastLED.delay(50);
for (uint8_t j = 0; j < STRIP_LENGTH; j++) {
leds[j].setRGB(255,255,255);
}
FastLED.show();
FastLED.delay(50);
FastLED.clear();
FastLED.show();
FastLED.delay(100);
}