Change default LED pin to 4 in esp32 ethernet builds#5323
Merged
softhack007 merged 4 commits intomainfrom Jan 28, 2026
Merged
Conversation
GPIO 4 seems to be one of the few pins that is not used in ANY supported ethernet config. See #5155 (comment)
LED pin: 16 -> 4 AR: no microphone, no pins clarify comment when to disable ESP-NOW
Contributor
WalkthroughAdded build flags in platformio.ini and made DEFAULT_LED_PIN conditional: it becomes 4 when WLED_USE_ETHERNET is defined (with a compile-time warning), otherwise 16. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@platformio.ini`:
- Line 514: Replace the incorrect preprocessor flag SR_DTYPE with the correct
flag SR_DMTYPE in the platformio build defines: change the define that currently
reads SR_DTYPE to SR_DMTYPE so the Audio Reactive code (referenced by
audio_reactive.cpp and its SR_DMTYPE checks) receives the intended -1 value to
disable pin allocation at startup (i.e., use -D SR_DMTYPE=-1).
* ethernet warning was repeating too often * make sure that AR usermod will not grab any PINs at startup
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@platformio.ini`:
- Line 516: The platformio.ini change enabled ESP-NOW by default by removing the
-D WLED_DISABLE_ESPNOW flag which can crash Ethernet-only boards using
ETH_CLOCK_GPIO0_OUT/ETH_CLOCK_GPIO16_OUT/ETH_CLOCK_GPIO17_OUT; either restore
the default-safe behavior by re-adding/commenting in -D WLED_DISABLE_ESPNOW with
a clear comment on how to enable ESP-NOW for compatible boards, or implement a
compile-time guard in the build/config logic (check WLED_USE_ETHERNET and
WLED_DISABLE_ESPNOW/ESP-NOW flags) to emit a build warning/error when
WLED_USE_ETHERNET is enabled without explicit confirmation that the board
supports ESP-NOW (reference symbols: -D WLED_DISABLE_ESPNOW, WLED_USE_ETHERNET,
ETH_CLOCK_GPIO0_OUT, ETH_CLOCK_GPIO16_OUT, ETH_CLOCK_GPIO17_OUT).
softhack007
added a commit
that referenced
this pull request
Jan 28, 2026
Change default LED pin to 4 in esp32 ethernet builds and set AR default to "no mic" mode. The "normal" default LED pin 16 is conflicting with pins needed by many ethernet boards, which can cause random crashes.
This was
linked to
issues
Jan 28, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
change default LED pin to 4 in ethernet builds, and set AR default to "no mic" mode.
The "normal" default LED pin 16 is conflicting with pins needed by many ethernet boards, which can cause random crashes.
This should avoid some stability problems reported by ethernet users:
Ethernet-related ESP-NOW and WIFI AP problems are not addressed by this PR.
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.