Learning how to program with Arduino, but the learning curve is out of my league.
I have this
#include <FastLED.h>
#define NUM_LEDS 4
#define DATA_PIN 3
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
// Turn the first led red for 1 second
leds[0] = CRGB::Green;
leds[1] = CRGB::Red;
leds[2] = CRGB::Green;
leds[3] = CRGB::Red;
FastLED.show( 99 );
delay(1000);
// Set the first led back to black for 1 second
leds[0] = CRGB::Red;
leds[1] = CRGB::Green;
leds[2] = CRGB::Red;
leds[3] = CRGB::Green;
FastLED.show( 99 );
delay(1000);
}
So, I want them to fade from green to red. led 1 is green, and led 2 is red I should probably program this in a different way, but I don't know how. Any ideas are welcome!