Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This #include statement was automatically added by the Particle IDE.
- #include "FastLED/FastLED.h"
- const int frameRate = 30;
- const int paletteSize = 5 * 16;
- using namespace NSFastLED;
- const CRGBPalette16 auroraPalette(
- CRGB(20,232,30),
- CRGB(0,234,141),
- CRGB(1,126,213),
- CRGB(181,61,255),
- CRGB(141,0,196),
- CRGB(20,232,30),
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- );
- CRGB led;
- void setup() {
- // attach our one NeoPixel LED to pin 6
- FastLED.addLeds<NEOPIXEL, 6>(&led, 1);
- // so we don't blind ourselves
- FastLED.setBrightness(63);
- }
- void loop() {
- static int index = 0;
- if (++index >= paletteSize) index = 0;
- led = ColorFromPalette(auroraPalette, index, 255, LINEARBLEND);
- FastLED.show();
- FastLED.delay(1000 / frameRate);
- }
Add Comment
Please, Sign In to add comment