Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FASTLED_ALLOW_INTERRUPTS 0 //Tried with and without this. same results.
- #include "FastLED.h"
- // How many leds in your strip?
- #define NUM_LEDS 15
- // For led chips like Neopixels, which have a data line, ground, and power, you just
- // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
- // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
- #define DATA_PIN 16
- // Define the array of leds
- CRGB leds[NUM_LEDS];
- void setup() {
- Serial.begin(115200);
- Serial.println("Hello, you've entered setup()...");
- FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
- }
- void loop() {
- // Turn the LED on, then pause
- leds[1] = CRGB::Red;
- FastLED.show();
- Serial.println("red...");
- delay(1000);
- Serial.println("blue...");
- // Now turn the LED off, then pause
- leds[1] = CRGB::Blue;
- FastLED.show();
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment