Skip to content

Proper LED_BUILTIN for CORE-ESP32 (ESP32C3) board #7914

Closed
@fabriziop

Description

@fabriziop

Related area

Onboard led blinking

Hardware specification

Onboard led

Is your feature request related to a problem?

Arduino IDE works fine with CORE-ESP32 board (choosing "ESP32C3 Dev Module" from board manager) except for the LED_BUILTIN value that is set to 30, while CORE-ESP32 has a LED on pin 12 and a secondary LED on pin 13.

Describe the solution you'd like

Provide the board manager with a board choice specific for the CORE-ESP32 board, returning the correct value of LED_BUILTIN: 12.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Activity

SuGlider

SuGlider commented on Mar 2, 2023

@SuGlider
Collaborator

@fabriziop -
ESP32C3 Dev Module has a configuration with a NeoLED in GPIO 8.

We made a change to the code and pin definition according to these links:
#6783
#6968
#6979

static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+8;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

Therefore, LED_BUILTIN may change in order to work with boards that use NeoLED instead of plain LED, depending on how the board Variant is created.

Maybe the CORE-ESP32 board may need a new Board definition and Variant setup.

self-assigned this
on Mar 2, 2023
SuGlider

SuGlider commented on Mar 2, 2023

@SuGlider
Collaborator

Provide the board manager with a board choice specific for the CORE-ESP32 board, returning the correct value of LED_BUILTIN: 12.

We rely on the community and board makers to add such new boards.
Please feel free to submit a PR adding it.

SuGlider

SuGlider commented on Mar 2, 2023

@SuGlider
Collaborator

It is possible to get some "inspiration" in a similar board, the https://github.com/espressif/arduino-esp32/blob/master/variants/esp_c3_m1_i_kit/pins_arduino.h
It has 5 LEDs... No NeoPixel.

Board Definition in https://github.com/espressif/arduino-esp32/blob/master/boards.txt#L21318-L21429

VojtechBartoska

VojtechBartoska commented on Aug 18, 2023

@VojtechBartoska
Contributor

Closing this as it was already covered in mentioned PR above and there are no updates from author of this issue. If needed, you can reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Status: SolvedThe issue has been resolved and requires no further action.Type: QuestionOnly question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Proper LED_BUILTIN for CORE-ESP32 (ESP32C3) board · Issue #7914 · espressif/arduino-esp32