Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- //#define NUM_LEDS 30
- //#define DATA_PIN 6
- #define LED_PIN 6
- #define LED_TYPE WS2811
- #define COLOR_ORDER GRB
- #define NUM_LEDS 30
- CRGB leds[NUM_LEDS];
- void setup() {
- delay(3000);
- FastLED.addLeds<LED_TYPE,LED_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
- //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