Guest User

Untitled

a guest
Apr 4th, 2022
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <FastLED.h>
  2.  
  3. #define NUM_LEDS 27
  4. #define DATA_PIN 3
  5.  
  6. // Define the array of leds
  7. CRGB leds[NUM_LEDS];
  8.  
  9. void setup() {
  10.   Serial.begin(9600);
  11.      FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);  // GRB ordering is typical
  12.  
  13. }
  14.  
  15. void loop() {
  16. Serial.print("NumLED ");
  17. Serial.println(NUM_LEDS);
  18.  
  19.   for(int i = 0; i <= NUM_LEDS; i++){
  20.     leds[i] = CHSV(255,255,30);
  21.     FastLED.show();
  22.     delay(50);
  23.     Serial.println(i);
  24.   }
  25.  
  26. Serial.println("hi");
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment