Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- #define NUM_LEDS 20
- #define DATA_PIN 12
- #define CLOCK_PIN 11
- CRGB leds[NUM_LEDS];
- void setup() {
- delay(2000);
- FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);
- }
- void loop() {
- for(int redLed = 0; redLed < NUM_LEDS; redLed = redLed + 1) {
- leds[redLed] = CRGB::Red;
- FastLED.show();
- delay(100);
- leds[redLed] = CRGB::Black;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement