Guest User

Untitled

a guest
Oct 12th, 2025
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. const uint16_t N_PX = 300;
  2. const uint8_t PXPIN = A0;
  3.  
  4. CRGB Pixels[N_PX];
  5. Comet Cmt = Comet(CRGB Pixels, N_PX);
  6.  
  7. void setup() {
  8. pinMode(PXPIN, OUTPUT);
  9. FastLED.addLeds<WS2811, PXPIN, RGB>(Pixels, N_PX);
  10. //first pixel magenta just to prove the connections are good and it's not my code...
  11. Pixels[0]= CRGB::Magenta;
  12. FastLED.show();
  13.  
  14. //setup the comet with these functions...
  15. Comet.setHue(100);
  16. Comet.setSpeed(200);
  17. Comet.setFade(10);
  18.  
  19. }
  20.  
  21. void loop() {
  22. Comet.Animate();
  23. FastLED.show()
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment