Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define NUM_LEDS 28
- CRGB leds[NUM_LEDS];
- #define FRAMES_PER_SECOND 240 // here you can control the speed. With the Access Point / Web Server the animations run a bit slower.
- void setup() {
- FastLED.addLeds<APA102, 6, 5, BGR>(leds, NUM_LEDS);
- fill_solid(leds, NUM_LEDS, CRGB::Black);
- FastLED.show();
- }
- void loop() {
- leds[03] = CRGB::Red;
- leds[04] = CRGB::Green;
- leds[05] = CRGB::Blue;
- leds[27] = CRGB::Magenta;
- FastLED.show();
- FastLED.delay(1000 / FRAMES_PER_SECOND);
- }
Advertisement
Add Comment
Please, Sign In to add comment