#include <FastLED.h>
#define LED_PIN 7 // GPIO 7 on ESP32-S3
#define LED_COUNT 1 // One WS2812 LED
#define LED_TYPE WS2812 // LED chipset
#define COLOR_ORDER GRB // Color order for WS2812
#define BRIGHTNESS 128 // Adjust as needed
CRGB leds[LED_COUNT];
void setup() {
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, LED_COUNT);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Basic color cycle
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
leds[0] = CRGB::Green;
FastLED.show();
delay(500);
leds[0] = CRGB::Blue;
FastLED.show();
delay(500);
// Rainbow fade
for (int hue = 0; hue < 255; hue++) {
leds[0] = CHSV(hue, 255, BRIGHTNESS);
FastLED.show();
delay(10);
}
}