Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- #define NUM_LEDS 30
- #define DATA_PIN 6
- CRGB leds[NUM_LEDS];
- void setup() {
- FastLED.addLeds<ws2811, data_pin,="" rgb="">(leds, NUM_LEDS);
- for (int i = 0; i < NUM_LEDS; i++) {
- leds[i] = CRGB::Black;
- }
- FastLED.show();
- }
- void loop() {
- for (int i = 0; i < NUM_LEDS; i++) {
- leds[i] = CRGB::Red;
- FastLED.show();
- delay(1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment