Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastSPI_LED2.h"
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- //
- // test code
- //
- //////////////////////////////////////////////////
- #define NUM_LEDS 42
- struct CRGB leds[NUM_LEDS];
- void setup() {
- // sanity check delay - allows reprogramming if accidently blowing power w/leds
- delay(2000);
- // For safety (to prevent too high of a power draw), the test case defaults to
- // setting brightness to 25% brightness
- LEDS.setBrightness(64);
- LEDS.addLeds<WS2811, 4>(leds, NUM_LEDS);
- }
- void loop() {
- LEDS.showColor(CRGB(255, 0, 0)); // R
- delay(1000);
- LEDS.showColor(CRGB(0, 0, 255)); // B
- delay(1000);
- LEDS.showColor(CRGB(0, 255, 0)); // G
- delay(1000);
- LEDS.showColor(CRGB(0, 0, 255)); // B
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement