LED Color Reference
| Color | RGB Value | State |
|---|---|---|
| Blue | (0, 0, 255) | Startup — attempting to connect to Wi-Fi |
| Green | (0, 255, 0) | Wi-Fi connected (Station) or AP hotspot active — ready, BEKLE state |
| Yellow / Orange | (255, 50, 0) | Wi-Fi connection failed after 30 retries |
| Red | (255, 0, 0) | SIL command received — destruction in progress |
The ledRenk Function
Both sketches share the same helper that wraps the NeoPixel API into a single three-argument call. You pass standard (R, G, B) byte values and the function handles the pixel update and refresh:
0 because the board has a single built-in LED (LED_SAYI = 1).
Brightness Setting
LED brightness is set once duringsetup() before the first color is applied:
80 keeps the LED visible without being distracting in a lab environment. You can raise it toward 255 for a brighter indicator or lower it for demos in dark rooms.
The NeoPixel object is initialized with
NEO_GRB + NEO_KHZ800, meaning the WS2812B on the ESP32-C6 stores colors in GRB order internally. Despite this, you still call ledRenk(r, g, b) with standard RGB arguments — the library handles the byte-order swap automatically. Do not re-order your arguments to compensate.State Transition Sequence
The LED follows the firmware lifecycle in a predictable order:- Blue —
setup()begins; Wi-Fi connection attempt starts. - Green — Wi-Fi connected (Station) or soft-AP started (AP mode); server ready.
- Yellow/Orange — Wi-Fi loop exceeded 30 retries (
30 × 500 ms = 15 s); setup exits. - Red —
/tetikleendpoint called;durumset to"SIL". - Green —
/sifirlaendpoint called;durumreset to"BEKLE".