#include <Adafruit_NeoPixel.h>
// Pin tanımları / Pin definitions
const int LED_PIN = 4;
const int LED_COUNT = 8;
const int BRIGHTNESS = 60;
// WS2812B: GRB sırası, 800 KHz / WS2812B: GRB order, 800 KHz
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
uint16_t hueOffset = 0;
void setup() {
Serial.begin(115200);
// Şerit başlat / Init strip
strip.begin();
strip.setBrightness(BRIGHTNESS);
strip.show();
Serial.println("WS2812B NeoPixel hazir — 8 LED gokkusagi modu");
}
void loop() {
// Her LED'e farklı hue / Assign hue per LED
for (int i = 0; i < LED_COUNT; i++) {
// 65536 = tam hue dairesi / Full hue circle
uint16_t pixelHue = hueOffset + (i * 65536L / LED_COUNT);
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show();
hueOffset += 256;
delay(20);
}