Advertisement
Guest User

Untitled

a guest
Dec 29th, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     #include <FastLED.h>
  2.     #define NUM_LEDS 50
  3.     #define DATA_PIN 2
  4.     CRGB leds[NUM_LEDS];
  5.      void setup() {
  6.        FastLED.addLeds<WS2811, DATA_PIN>(leds, NUM_LEDS);
  7. FastLED.setBrightness( 25 );
  8.    }
  9.    void loop() {
  10.     for(int n=0; n<NUM_LEDS; n+=2)
  11.         leds[n] = CRGB::Blue;
  12.    for(int n=1; n<=NUM_LEDS; n+=2)
  13.         leds[n] = CRGB::Green;
  14.         FastLED.show();
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement