Advertisement
Guest User

Untitled

a guest
Dec 15th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <FastLED.h>
  2.  
  3. #define NUM_LEDS 10
  4.  
  5. #define DATA_PIN D1
  6. #define CLOCK_PIN 13
  7.  
  8. CRGB leds[NUM_LEDS];
  9.  
  10. void setup() {
  11. Serial.begin(9600);
  12. delay(1500);
  13.  
  14. FastLED.addLeds<WS2812, DATA_PIN>(leds, NUM_LEDS);
  15. }
  16.  
  17. void loop() {
  18. leds[0] = CRGB::Red;
  19. FastLED.show();
  20. delay(500);
  21.  
  22. leds[0] = CRGB::Black;
  23. FastLED.show();
  24. delay(500);
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement