Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define NUM_LEDS 30
- #define P_NUM 8
- #define COLOR_ORDER GRB
- CRGB leds[NUM_LEDS];
- void setup() {
- FastLED.addLeds<WS2812B, P_NUM ,GRB>(leds, NUM_LEDS);
- Serial.begin(9600);
- FastLED.setBrightness(50);
- FastLED.clear();
- FastLED.show();
- }
- void loop() {
- for(int i=0;i<NUM_LEDS;i+=6)
- {
- for(int j=0;j<6;j++)
- {
- leds[i+j]=CRGB::Red;
- }
- delay(500);
- FastLED.show();
- }
- }
Add Comment
Please, Sign In to add comment