I wish to blink only one led (number two in the strip) bit it does not do so, any idea why and how can I do it?
Code:
#include "FastLED.h"
//Number of LEDs
#define NUM_LEDS 9
//Define our clock and data lines
#define DATA_PIN 11
#define CLOCK_PIN 13
//Create the LED array
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);
FastLED.setBrightness(5);
}
void loop() {
leds[0] = CRGB::Blue;
leds[1] = CRGB::Green;
//Blink this one only
leds[2] = CRGB::Red;
leds[2] = CRGB::Black;
delay(500);
leds[2] = CRGB::Red;
leds[3] = CRGB::White;
leds[4] = CRGB::Purple;
leds[5] = CRGB::Green;
leds[6] = CRGB::Blue;
leds[7] = CRGB::Yellow;
leds[8] = CRGB::Red;
FastLED.show();
}
does not do sodoes not describe what it does ... please describe what you expect to happen, and what you observe happening – jsotola Feb 06 '21 at 03:11