#include <FastLED.h>
#define DATA_PIN 26 // Change this to the pin you connect the data line to
#define NUM_LEDS 1
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
// Set the color of the LED
/* green();
delay(1000);
red();
delay(1000);
blue();
delay(1000); */
redb();
}
void green() {
leds[0] = CRGB::Green;
FastLED.show();
}
void red() {
leds[0] = CRGB::Red;
FastLED.show();
}
void blue() {
leds[0] = CRGB::Blue;
FastLED.show();
}
void redb() {
leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
leds[0] = CRGB::Black;
FastLED.show();
delay(1000);
/* leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
leds[0] = CRGB::Black;
FastLED.show();
delay(1000);
leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
leds[0] = CRGB::Black;
FastLED.show();
delay(1000);
leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
leds[0] = CRGB::Black;
FastLED.show(); */
}