#include <FastLED.h>
#define LED_PIN 3
#define NUM_LEDS 30
#define BRIGHTNESS 200 // Set LED brightness (0-255)
#define HUE_INCREMENT 1 // Increment for hue shift
#define DELAY_TIME 10 // Delay time in milliseconds for smooth transition
CRGB leds[NUM_LEDS];
uint8_t hue = 0; // Variable to keep track of the hue
void setup() {
Serial.begin(9600);
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Fill the entire strip with the current hue
fill_solid(leds, NUM_LEDS, CHSV(hue, 255, 255)); // Saturation and value set to max
// Update the LEDs
FastLED.show();
// Increment hue for the next loop
hue += HUE_INCREMENT;
// Add a small delay to control speed of hue cycling
delay(DELAY_TIME);
}