void test_temperature(){ // draw a generic, no-name rainbow static uint8_t starthue = 0; for(uint8_t col = 0; col < 10; col++){ if(col%2 == 0) { fill_rainbow( &leds[XY(col,0)], HEIGHT, starthue, 20); } else { fill_rainbow_reverse( &leds[XY(col,HEIGHT-1)], HEIGHT, starthue, 20); } } --starthue; // Choose which 'color temperature' profile to enable. uint8_t secs = (millis() / 1000) % (DISPLAYTIME * 2); if( secs < DISPLAYTIME) { FastLED.setTemperature( TEMPERATURE_1 ); // first temperature leds[0] = TEMPERATURE_1; // show indicator pixel } else { FastLED.setTemperature( TEMPERATURE_2 ); // second temperature leds[0] = TEMPERATURE_2; // show indicator pixel } // Black out the LEDs for a few secnds between color changes // to let the eyes and brains adjust if( (secs % DISPLAYTIME) < BLACKTIME) { memset8( leds, 0, NUM_LEDS * sizeof(CRGB)); } FastLED.show(); FastLED.delay(20); }
void MathieuMode::loop(CRGB *leds){ //(int)(millis()*2.0f) fill_rainbow(leds, count, (int)(sin(millis()*0.003f)*180.0f+180.0f), 1.4); }
void mesmerRender() { fill_rainbow(frameBuffer, NUM_LEDS, hueOffset, (HUE_MAX_RAINBOW + 1) / NUM_LEDS); FastLED.show(brightness); }