Guest User

Hat_V2_Hardware_Test_Pin_5 doesn't work

a guest
Jun 4th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <FastLED.h>
  2.  
  3. #define NUM_LEDS      28
  4. CRGB leds[NUM_LEDS];
  5. #define FRAMES_PER_SECOND  240    // here you can control the speed. With the Access Point / Web Server the animations run a bit slower.
  6.  
  7.  
  8. void setup() {
  9.   FastLED.addLeds<APA102, 6, 5, BGR>(leds, NUM_LEDS);
  10.   fill_solid(leds, NUM_LEDS, CRGB::Black);
  11.   FastLED.show();
  12. }
  13.  
  14.  
  15. void loop() {
  16.   leds[03] = CRGB::Red;
  17.   leds[04] = CRGB::Green;
  18.   leds[05] = CRGB::Blue;
  19.   leds[27] = CRGB::Magenta;
  20.   FastLED.show();
  21.  
  22.   FastLED.delay(1000 / FRAMES_PER_SECOND);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment