File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1212
1313// LED LIGHTING SETUP
1414#define LED_PIN 6
15- #define NUM_LEDS 100 // 250
15+ #define NUM_LEDS 200 // 250
1616#define BRIGHTNESS 64
1717#define LED_TYPE WS2811
1818#define COLOR_ORDER GRB
@@ -72,6 +72,7 @@ void setup()
7272// FUNCTION TO GENERATE COLOR BASED ON VIRTUAL WHEEL
7373// https://github.com/NeverPlayLegit/Rainbow-Fader-FastLED/blob/master/rainbow.ino
7474CRGB Scroll (int pos) {
75+ pos = abs (pos);
7576 CRGB color (0 ,0 ,0 );
7677 if (pos < 85 ) {
7778 color.g = 0 ;
@@ -86,6 +87,16 @@ CRGB Scroll(int pos) {
8687 color.g = 255 - color.b ;
8788 color.r = 1 ;
8889 }
90+ /*
91+ Serial.print(pos);
92+ Serial.print(" -> ");
93+ Serial.print("r: ");
94+ Serial.print(color.r);
95+ Serial.print(" g: ");
96+ Serial.print(color.g);
97+ Serial.print(" b: ");
98+ Serial.println(color.b);
99+ */
89100 return color;
90101}
91102
@@ -109,7 +120,11 @@ void doubleRainbow()
109120{
110121 for (int i = NUM_LEDS - 1 ; i >= midway; i--) {
111122 if (i < react + midway) {
123+ // Serial.print(i);
124+ // Serial.print(" -> ");
112125 leds[i] = Scroll ((i * 256 / 50 + k) % 256 );
126+ // Serial.print(i);
127+ // Serial.print(" -> ");
113128 leds[(midway - i) + midway] = Scroll ((i * 256 / 50 + k) % 256 );
114129 }
115130 else
You can’t perform that action at this time.
0 commit comments