Advertisement
Guest User

Untitled

a guest
May 18th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include "FastLED.h"
  2. #define DATA_PIN 5
  3. #define Color_ORDER GRB
  4. #define LED_TYPE WS2812B
  5. #define NUM_LEDS 5
  6. CRGB leds[NUM_LEDS];
  7.  
  8.  
  9. #define NUM_RAILA 3
  10. #define NUM_CAPS 2
  11.  
  12. uint8_t raila[NUM_RAILA] = {0,1,3 };
  13. uint8_t caps[NUM_CAPS] = {2,4 };
  14. void setup() {
  15. FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  16. }
  17.  
  18. void loop ()
  19. {
  20. for (int i = 0; i < NUM_RAILA; i++)
  21. leds[raila[i]] = CRGB::White;
  22. }
  23.  
  24. {
  25. for (int i = 0; i < NUM_CAPS; i++)
  26. leds[caps[i]] = CRGB::Blue;
  27. }
  28.  
  29. //for (int i = 0; i < NUM_RAILA; i++) {
  30. //leds[raila[i]] = CRGB::White;
  31. //}
  32. //for (int i = 0; i < NUM_CAPS; i++) {
  33. //leds[raila[i]] = CRGB::Blue;
  34. //}
  35. //FastLED.show();
  36. {
  37. FastLED.show();
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement