Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
fabriziop opened this issue Mar 1, 2023 · 4 comments
Closed
1 task done

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

fabriziop opened this issue Mar 1, 2023 · 4 comments
Assignees

Comments

@fabriziop
Copy link

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.
@fabriziop fabriziop added the Type: Feature request Feature request for Arduino ESP32 label Mar 1, 2023
@SuGlider
Copy link
Collaborator

SuGlider commented Mar 2, 2023

@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.

@SuGlider SuGlider self-assigned this Mar 2, 2023
@SuGlider SuGlider added Type: Question Only question and removed Type: Feature request Feature request for Arduino ESP32 labels Mar 2, 2023
@SuGlider
Copy link
Collaborator

SuGlider commented Mar 2, 2023

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
Copy link
Collaborator

SuGlider commented Mar 2, 2023

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
Copy link
Collaborator

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
Projects
None yet
Development

No branches or pull requests

3 participants