|
|
|
|
@ -56,6 +56,16 @@ void dual_color(struct CRGB color1, struct CRGB color2, uint8_t wait)
|
|
|
|
|
delay(wait);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void xmas(uint8_t wait){
|
|
|
|
|
for (int j = 0; j < 2; j++){
|
|
|
|
|
for (int i = 0; i< NUM_LEDS; i++){
|
|
|
|
|
leds[i] = ((i % 2) == j)? CRGB::Red: CRGB::Green;
|
|
|
|
|
FastSPI_LED.show();
|
|
|
|
|
}
|
|
|
|
|
delay(wait);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
boolean check_button(){
|
|
|
|
|
if (button1.checkPress() == 1) {
|
|
|
|
|
run_mod = true; // Serial.println("SHORT PRESS!");
|
|
|
|
|
@ -79,7 +89,7 @@ void loop()
|
|
|
|
|
{
|
|
|
|
|
if (run_mod){
|
|
|
|
|
// put your main code here, to run repeatedly:
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
|
|
colorWipe_up(CRGB::Red, tempo_anim);
|
|
|
|
|
delay(tempo_anim);
|
|
|
|
|
colorWipe_up(CRGB::Green, tempo_anim);
|
|
|
|
|
@ -88,14 +98,17 @@ if (run_mod){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (run_mod) {
|
|
|
|
|
//dual_color( CRGB::LightGreen,CRGB::Aqua,tempo_anim);
|
|
|
|
|
// dual_color( CRGB::Aqua,CRGB::LightGreen,tempo_anim);
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
|
|
dual_color(CRGB::Red, CRGB::Green, tempo_anim);
|
|
|
|
|
// dual_color( CRGB::Green,CRGB::Red,tempo_anim);
|
|
|
|
|
if (!check_button()) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (run_mod){
|
|
|
|
|
for (int i = 0; i < 20; i++) {
|
|
|
|
|
xmas( tempo_anim);
|
|
|
|
|
if (!check_button()) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
check_button();
|
|
|
|
|
black_out();
|
|
|
|
|
delay(tempo_anim);
|
|
|
|
|
|