Skip to content

Commit 5f99e3c

Browse files
committed
Add option of RGB pre-heat for auto patterns to tame them down a bit
1 parent 98a3e08 commit 5f99e3c

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Deevstock/DeevstockDMX/DeevstockDMX.ino

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ uint8_t BRIGHTNESS = 255;
4747
uint8_t SPEEDO = 180;
4848
uint8_t FADE = 180;
4949

50+
uint8_t RED = 0;
51+
uint8_t GREEN = 0;
52+
uint8_t BLUE = 0;
53+
54+
5055
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
5156
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
5257

@@ -256,6 +261,11 @@ void loop()
256261
pattern = p;
257262
}
258263
currentPalette = palettes[map(Dmx.getBuffer()[5], 0, 255, 0, (paletteCount - 1))]; // channel 6
264+
265+
RED = Dmx.getBuffer()[6];
266+
GREEN = Dmx.getBuffer()[7];
267+
BLUE = Dmx.getBuffer()[8];
268+
259269
// EVERY_N_SECONDS( 2 ) {
260270
// Serial.println(p);
261271
// Serial.print("b=");

Deevstock/DeevstockDMX/support.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ void showSegments() {
8989
for (int s = 0; s < NUM_STRIPS; s++) {
9090
for (int i = 0; i < NUM_AUDIO_LEDS; i++) {
9191
int p = (s * NUM_AUDIO_LEDS) + i;
92-
leds[getPixel(p)] = ledsAudio[i];
92+
if(RED > 0 || GREEN > 0 || BLUE > 0) {
93+
leds[getPixel(p)] = blend(ledsAudio[i], CRGB(RED, GREEN, BLUE), 100);
94+
}
95+
else {
96+
leds[getPixel(p)] = ledsAudio[i];
97+
}
9398
}
9499
}
95100
FastLED.show();
96101
}
97-
98-
99-

0 commit comments

Comments
 (0)