Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FASTLED_ALLOW_INTERRUPTS 0
- #include <FastLED.h>
- #define NUM_LEDS 3
- #define DATA_PIN D7
- // Define the array of leds
- CRGB leds[NUM_LEDS];
- void setup() {
- Serial.begin(115200);
- pinMode(D8, OUTPUT);
- FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
- }
- void loop() {
- // Turn the LED on, then pause
- leds[0] = CRGB::Red;
- leds[1] = CRGB::Green;
- leds[2] = CRGB::Blue;
- FastLED.show();
- Serial.println("pixel on");
- digitalWrite(D8, HIGH);
- delay(500);
- digitalWrite(D8, LOW);
- delay(500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement