Demonstrates how to use a different strip type.
Demonstrates how to use a different strip type.
#define DATA_PIN 6
#define NUM_LEDS 60
#define BRIGHTNESS 50
void setup() {
strip.setBrightness(BRIGHTNESS);
}
void loop() {
rainbow(10);
}
void rainbow(unsigned long wait) {
for (unsigned long firstPixelHue = 0; firstPixelHue < 65536; firstPixelHue += 256) {
for (unsigned int i = 0; i < strip.numPixels(); i++) {
unsigned long pixelHue = firstPixelHue + (i * 65536UL / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show();
delay(wait);
}
}
Header for the FastLED_NeoPixel library.
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
FastLED implementation of the Adafruit_NeoPixel class. Base class for all strips.
Definition FastLED_NeoPixel.h:62