allanGEE

FastLED Blocks Of 5 Non Animated IN PROGRESS 2016-11-28

Nov 28th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. // *********************
  2. // *********************
  3. // *** TESTING ***
  4. // *** BLOCKS OF 5 ***
  5. // *********************
  6. // *********************
  7. //
  8. #include "FastLED.h"
  9. #define DATA_PIN 8
  10. //#define CLK_PIN 4
  11. #define NUM_LEDS 12
  12. //
  13. CRGB leds[NUM_LEDS];
  14. //
  15. //
  16. void setup()
  17. // void setup gets everything ready for what will run in the void loop.
  18. {
  19. //
  20. delay(3000); // 3 second delay for recovery
  21. //
  22. //FastLED.setBrightness(96);
  23. //
  24. FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
  25. //
  26. } // END OF VOID SETUP
  27. //
  28. void loop()
  29. //
  30. {
  31. for (int i = 0; i<=NUM_LEDS; i=i+10) //1st then every 10th LED
  32. {
  33. leds[i] = CHSV(0,255,2550);
  34. }
  35. for (int i = 1; i<=NUM_LEDS; i=i+10) //2nd then every 10th LED
  36. {
  37. leds[i] = CHSV(0,255,2550);
  38. }
  39. for (int i = 2; i<=NUM_LEDS; i=i+10) //3rd then every 10th LED
  40. {
  41. leds[i] = CHSV(0,255,2550);
  42. }
  43. for (int i = 3; i<=NUM_LEDS; i=i+10) //4th then every 10th LED
  44. {
  45. leds[i] = CHSV(0,255,2550);
  46. }
  47. for (int i = 4; i<=NUM_LEDS; i=i+10) //5th then every 10th LED
  48. {
  49. leds[i] = CHSV(0,255,2550);
  50. }
  51. for (int i = 5; i<=NUM_LEDS; i=i+10) //6th then every 10th LED
  52. {
  53. leds[i] = CHSV(96,255,2550);
  54. }
  55. for (int i = 6; i<=NUM_LEDS; i=i+10) //7th then every 10th LED
  56. {
  57. leds[i] = CHSV(96,255,2550);
  58. }
  59. for (int i = 7; i<=NUM_LEDS; i=i+10) //8th then every 10th LED
  60. {
  61. leds[i] = CHSV(96,255,2550);
  62. }
  63. for (int i = 8; i<=NUM_LEDS; i=i+10) //9th then every 10th LED
  64. {
  65. leds[i] = CHSV(96,255,2550);
  66. }
  67. for (int i = 9; i<=NUM_LEDS; i=i+10) //10th then every 10th LED
  68. {
  69. leds[i] = CHSV(96,255,2550);
  70. }
  71.  
  72. FastLED.show();
  73.  
  74. }
Advertisement
Add Comment
Please, Sign In to add comment