Guest User

Untitled

a guest
Mar 12th, 2025
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <FastLED.h>
  2.  
  3.  
  4. #define NUM_LEDS 30
  5. #define P_NUM 8
  6.  
  7. #define COLOR_ORDER GRB
  8.  
  9.  
  10.  
  11. CRGB leds[NUM_LEDS];
  12.  
  13.  
  14. void setup() {
  15.  
  16. FastLED.addLeds<WS2812B, P_NUM ,GRB>(leds, NUM_LEDS);
  17.  
  18. Serial.begin(9600);
  19. FastLED.setBrightness(50);
  20.  
  21. FastLED.clear();
  22. FastLED.show();
  23. }
  24.  
  25. void loop() {
  26. for(int i=0;i<NUM_LEDS;i+=6)
  27. {
  28. for(int j=0;j<6;j++)
  29. {
  30. leds[i+j]=CRGB::Red;
  31. }
  32. delay(500);
  33. FastLED.show();
  34. }
  35.  
  36. }
Add Comment
Please, Sign In to add comment