Compare commits
3
Commits
88fee54f96
...
dfa339a9b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfa339a9b9 | ||
|
|
4aec064f3c | ||
|
|
39326e3247 |
+10
-6
@@ -194,21 +194,25 @@ void DefaultLedStub::begin() {
|
||||
return;
|
||||
}
|
||||
|
||||
Serial.println("[LED] Launchpad-style startup animation...");
|
||||
Serial.println("[LED] Launchpad-style startup animation (paired)...");
|
||||
|
||||
// Launchpad X style: sweep each LED through palette, then all-off
|
||||
for (int i = 0; i < NUM_LEDS; i++) {
|
||||
// Sweep each pixel-pair through palette, then off
|
||||
for (int pair = 0; pair < 5; pair++) {
|
||||
int i1 = pair * 2;
|
||||
int i2 = pair * 2 + 1;
|
||||
for (int c = 1; c <= 127; c += 8) {
|
||||
uint32_t color = launchpad_palette[c];
|
||||
uint8_t r = (color >> 16) & 0xFF;
|
||||
uint8_t g = (color >> 8) & 0xFF;
|
||||
uint8_t b = color & 0xFF;
|
||||
mux_ptr->set_led_color(i, r, g, b);
|
||||
mux_ptr->set_led_color(i1, r, g, b);
|
||||
mux_ptr->set_led_color(i2, r, g, b);
|
||||
mux_ptr->show();
|
||||
delay(15);
|
||||
}
|
||||
// Turn off this LED before moving to next
|
||||
mux_ptr->set_led_color(i, 0, 0, 0);
|
||||
// Turn off this pair before moving to next
|
||||
mux_ptr->set_led_color(i1, 0, 0, 0);
|
||||
mux_ptr->set_led_color(i2, 0, 0, 0);
|
||||
mux_ptr->show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user