Skip to content

Define custom pin mappings in wled.h#370

Draft
kelteks78 wants to merge 6 commits into
MoonModules:mdevfrom
kelteks78:mdev
Draft

Define custom pin mappings in wled.h#370
kelteks78 wants to merge 6 commits into
MoonModules:mdevfrom
kelteks78:mdev

Conversation

@kelteks78

@kelteks78 kelteks78 commented Jun 17, 2026

Copy link
Copy Markdown

Matrixboard

Summary by CodeRabbit

  • Chores

    • Updated LED GPIO pin mappings to support two separate RGB LED channel groups.
    • Added/extended additional LED control and display-related GPIO assignments.
  • Build

    • Expanded the default build environments to include the ESP32-S3 (16MB OPI) target for broader firmware configuration support.
    • Updated build configuration examples to reference the ESP32-S3 (16MB OPI) option.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

wled00/wled.h adds a WLED_MY_PINS include guard block containing preprocessor directives for two RGB LED groups (R1/G1/B1, R2/G2/B2) and auxiliary GPIO pins (A_PINE_PIN, LAT_PIN, OE_PIN, CLK_PIN). platformio.ini adds esp32s3_16MB_OPI to the default build environments list and includes commented example references.

Changes

Hardware Configuration for ESP32-S3 Variant

Layer / File(s) Summary
WLED_MY_PINS guarded pin assignments
wled00/wled.h
Adds a #ifndef WLED_MY_PINS guard block defining pin constants for two RGB LED channel groups and auxiliary/control GPIO pins.
ESP32-S3 OPI build environment
platformio.ini
Adds esp32s3_16MB_OPI to the active default_envs list and includes the target in commented example configuration lines for CI binaries and single binary builds, enabling it as a default build target.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary change in the changeset - adding custom pin mappings to wled.h file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wled00/wled.h`:
- Around line 1-17: The pin definitions (R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN,
B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN) in the
WLED_MY_PINS block do not match the HUB75 pin order documented in
bus_manager.cpp. Verify the correct pin mapping against the board schematic and
update each pin definition to match the proper HUB75 wiring order. Additionally,
if this header file is used by multiple build targets, scope the WLED_MY_PINS
block with a conditional preprocessor directive to apply these pin definitions
only to the Matrixboard build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b08eb68-bebb-4ce5-8929-9f6fb4de6d39

📥 Commits

Reviewing files that changed from the base of the PR and between c850a8c and 65fc0cf.

📒 Files selected for processing (1)
  • wled00/wled.h

Comment thread wled00/wled.h
Comment on lines +1 to +17
#ifndef WLED_MY_PINS
#define WLED_MY_PINS
#define R1_PIN 42
#define G1_PIN 41
#define B1_PIN 40
#define R2_PIN 39
#define G2_PIN 38
#define B2_PIN 45
#define A_PIN 1
#define B_PIN 2
#define C_PIN 3
#define D_PIN 4
#define E_PIN 5
#define LAT_PIN 6
#define OE_PIN 7
#define CLK_PIN 8
#endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Align this pinout with the Matrixboard wiring contract.

These values don’t match the HUB75 pin order documented in bus_manager.cpp, so the matrix driver will be wired incorrectly on the target board. Please verify the mapping against the actual board schematic, and scope this block to the Matrixboard build only if this header is shared by other targets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wled00/wled.h` around lines 1 - 17, The pin definitions (R1_PIN, G1_PIN,
B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN,
OE_PIN, CLK_PIN) in the WLED_MY_PINS block do not match the HUB75 pin order
documented in bus_manager.cpp. Verify the correct pin mapping against the board
schematic and update each pin definition to match the proper HUB75 wiring order.
Additionally, if this header file is used by multiple build targets, scope the
WLED_MY_PINS block with a conditional preprocessor directive to apply these pin
definitions only to the Matrixboard build.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@platformio.ini`:
- Line 108: The environment name esp32s3_16MB_OPI is referenced in the
default_envs list but lacks a corresponding environment section definition in
platformio.ini. To fix this, you must either add a new [env:esp32s3_16MB_OPI]
section with the appropriate board configuration and build settings to match the
other environment definitions in the file, or remove esp32s3_16MB_OPI from the
default_envs list if this environment is not needed. Choose the appropriate
action based on whether you intend to support building for this ESP32-S3
variant.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9cf2e36b-62e3-4f7d-bf81-6f17765c2ff4

📥 Commits

Reviewing files that changed from the base of the PR and between 65fc0cf and 1f899db.

📒 Files selected for processing (1)
  • platformio.ini

Comment thread platformio.ini
@softhack007

Copy link
Copy Markdown
Collaborator

@kelteks78 this looks like your personal configuration, are you sure you want this merged into the main WLEDMM repo?

@softhack007 softhack007 marked this pull request as draft June 20, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants