Change default LED pin to 4 in Ethernet builds

GPIO 4 seems to be one of the few pins that is not used in ANY supported ethernet config.

See https://github.com/wled/WLED/issues/5155#issuecomment-3614391561
This commit is contained in:
Frank Möhle
2026-01-27 23:14:06 +01:00
committed by GitHub
parent 9683896a21
commit e867fcab1a

View File

@@ -611,7 +611,12 @@ static_assert(WLED_MAX_BUSSES <= 32, "WLED_MAX_BUSSES exceeds hard limit");
#define DEFAULT_LED_PIN 2 // GPIO2 (D4) on Wemos D1 mini compatible boards, safe to use on any board
#endif
#else
#if defined(WLED_USE_ETHERNET)
#define DEFAULT_LED_PIN 4 // GPIO4 seems to be a "safe bet" for all known ethernet boards (issue #5155)
#warning "Compiling with Ethernet support. The default LED pin has been changed to pin 4."
#else
#define DEFAULT_LED_PIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards (if it is unusable it will be reassigned in WS2812FX::finalizeInit())
#endif
#endif
#define DEFAULT_LED_TYPE TYPE_WS2812_RGB
#define DEFAULT_LED_COUNT 30