#include <FastLED.h>
#define LED_PIN 0 // Define the pin connected to the data input of the Neopixel
#define NUM_LEDS 1 // Define the number of LEDs (assuming a single Neopixel)
CRGB leds[NUM_LEDS]; // Create an array to hold LED colors
void setup() {
FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, NUM_LEDS); // Initialize the FastLED library
}
void loop() {
// Turn on the Neopixel (set it to a specific color, e.g., white)
leds[0] = CRGB::White;
// Show the color on the Neopixel
FastLED.show();
delay(500); // Wait for 500 milliseconds (half a second)
// Turn off the Neopixel
leds[0] = CRGB::Black; // Black means off
// Show the color (turn off the Neopixel)
FastLED.show();
delay(500); // Wait for another 500 milliseconds (half a second)
}