Advertisement
marmil

simple_test.ino

Aug 28th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. // simple test
  2.  
  3. #include "FastLED.h"
  4. #define NUM_LEDS 90
  5. #define PIN 12
  6. CRGB leds[NUM_LEDS];
  7.  
  8. void setup() {
  9.   FastLED.addLeds<WS2812B, PIN, GRB>(leds, NUM_LEDS);
  10. }
  11.  
  12. void loop() {
  13.   leds[0] = CRGB(0,0,0);        //off
  14.   leds[1] = CRGB(255,255,255);  //white
  15.   leds[2] = CRGB(255,0,0);      //red
  16.   leds[3] = CRGB(0,255,0);      //green
  17.   leds[4] = CRGB(0,0,255);      //blue
  18.  
  19.   FastLED.show();
  20.   delay(1000);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement