|
|
@ -14,6 +14,7 @@ void setup() |
|
|
{ |
|
|
{ |
|
|
strip.begin(); |
|
|
strip.begin(); |
|
|
strip.show(); // Initialize all pixels to 'off'
|
|
|
strip.show(); // Initialize all pixels to 'off'
|
|
|
|
|
|
strip.setBrightness(50); |
|
|
pinMode(2,INPUT_PULLUP); // internal pull-up resistor
|
|
|
pinMode(2,INPUT_PULLUP); // internal pull-up resistor
|
|
|
attachInterrupt (digitalPinToInterrupt (BUTTON), changeEffect, CHANGE); // pressed
|
|
|
attachInterrupt (digitalPinToInterrupt (BUTTON), changeEffect, CHANGE); // pressed
|
|
|
} |
|
|
} |
|
|
@ -22,7 +23,7 @@ void setup() |
|
|
void loop() { |
|
|
void loop() { |
|
|
EEPROM.get(0,selectedEffect); |
|
|
EEPROM.get(0,selectedEffect); |
|
|
|
|
|
|
|
|
if(selectedEffect>18) { |
|
|
if(selectedEffect>19) { |
|
|
selectedEffect=0; |
|
|
selectedEffect=0; |
|
|
EEPROM.put(0,0); |
|
|
EEPROM.put(0,0); |
|
|
} |
|
|
} |
|
|
@ -163,6 +164,14 @@ void loop() { |
|
|
meteorRain(0xff,0xff,0xff,10, 64, true, 30); |
|
|
meteorRain(0xff,0xff,0xff,10, 64, true, 30); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
case 19: { |
|
|
|
|
|
colorWipe2(strip.Color( 255, 255, 255), 10); // White
|
|
|
|
|
|
colorWipe2(strip.Color( 0, 0, 255), 10); // Blue
|
|
|
|
|
|
colorWipe2(strip.Color( 255, 169, 87), 10); // 2700k
|
|
|
|
|
|
colorWipe2(strip.Color( 0, 0, 255), 10); // Blue
|
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -472,6 +481,14 @@ void colorWipe(byte red, byte green, byte blue, int SpeedDelay) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void colorWipe2(uint32_t color, int wait) { |
|
|
|
|
|
for(int i=0; i <NUM_LEDS; i++) { |
|
|
|
|
|
strip.setPixelColor(i, color); |
|
|
|
|
|
strip.show(); |
|
|
|
|
|
delay(wait); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void rainbowCycle(int SpeedDelay) { |
|
|
void rainbowCycle(int SpeedDelay) { |
|
|
byte *c; |
|
|
byte *c; |
|
|
uint16_t i, j; |
|
|
uint16_t i, j; |
|
|
|