Advertisement
Guest User

Untitled

a guest
Nov 9th, 2024
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <FastLED.h>
  2. #define NUM_LEDS 1
  3. #define DATA_PIN 5
  4.  
  5. CRGB leds[NUM_LEDS];
  6.  
  7. void setup() {
  8. FastLED.addLeds<WS2813, DATA_PIN, RGB>(leds, NUM_LEDS);
  9. }
  10.  
  11. void loop() {
  12. leds[0] = CRGB::Red;
  13. FastLED.show();
  14. delay(500);
  15. leds[0] = CRGB::Black;
  16. FastLED.show();
  17. delay(500);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement