Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define NUM_LEDS 50
- #define DATA_PIN 2
- CRGB leds[NUM_LEDS];
- void setup() {
- FastLED.addLeds<WS2811, DATA_PIN>(leds, NUM_LEDS);
- FastLED.setBrightness( 25 );
- }
- void loop() {
- for(int n=0; n<NUM_LEDS; n+=2)
- leds[n] = CRGB::Blue;
- for(int n=1; n<=NUM_LEDS; n+=2)
- leds[n] = CRGB::Green;
- FastLED.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement