#define LED_PIN 3
#define NUM_LEDS 60
#define CHIPSET WS2811
#define COLOR_ORDER GRB
#define BRIGHTNESS 128
#define TEMPERATURE_1 Tungsten100W
#define TEMPERATURE_2 OvercastSky
#define DISPLAYTIME 20
#define BLACKTIME 3
void loop()
{
static uint8_t starthue = 0;
uint8_t secs = (millis() / 1000) % (DISPLAYTIME * 2);
if( secs < DISPLAYTIME) {
leds[0] = TEMPERATURE_1;
} else {
leds[0] = TEMPERATURE_2;
}
if( (secs % DISPLAYTIME) < BLACKTIME) {
}
}
void setup() {
delay( 3000 );
}
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
void setTemperature(const struct CRGB &temp)
Set a global color temperature.
void delay(unsigned long ms)
Delay for the given number of milliseconds.
void setBrightness(uint8_t scale)
Set the global brightness scaling.
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
@ TypicalSMD5050
Typical values for SMD5050 LEDs.
void fill_rainbow(struct CRGB *targetArray, int numToFill, uint8_t initialhue, uint8_t deltahue)
Fill a range of LEDs with a rainbow of colors.
void * memset8(void *ptr, uint8_t value, uint16_t num)
Faster alternative to memset() on AVR.
Representation of an RGB pixel (Red, Green, Blue)