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

Boards: Update LED_BUILTIN with the correct value for esp32c3 #10074

Closed
wants to merge 1 commit into from

Conversation

stan220
Copy link

@stan220 stan220 commented Jul 25, 2024

Checklist

  1. Please provide specific title of the PR describing the change, including the component name (eg. „Update of Documentation link on Readme.md“)
  2. Please provide related links (eg. Issue which will be closed by this Pull Request)
  3. Please update relevant Documentation if applicable
  4. Please check Contributing guide
  5. Please confirm option to "Allow edits and access to secrets by maintainers" when opening a Pull Request

This entire section above can be deleted if all items are checked.


Description of Change

The led pin for esp32-c3 should be pin 8.

Tests scenarios

I was upload blink example and checked it myself on my esp32c3.

Related links

According to this manual and esp32-c3 schema:
https://wiki.icbbuy.com/doku.php?id=developmentboard:esp32-c3mini
One more example:
https://github.com/MoonFox2006/ESP32C3_Wake_Demo/blob/main/src/main.cpp#L6

@CLAassistant
Copy link

CLAassistant commented Jul 25, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Jul 25, 2024

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello stan220, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 0622644

@stan220 stan220 changed the title Update LED_BUILTIN to correct value for esp32c3. Update LED_BUILTIN with the correct value for esp32c3. Jul 25, 2024
@VojtechBartoska VojtechBartoska added the Status: Review needed Issue or PR is awaiting review label Jul 26, 2024
@VojtechBartoska VojtechBartoska changed the title Update LED_BUILTIN with the correct value for esp32c3. Boards: Update LED_BUILTIN with the correct value for esp32c3 Jul 26, 2024
@VojtechBartoska
Copy link
Contributor

Thanks for PR @stan220, we will review it soon.

@P-R-O-C-H-Y
Copy link
Member

Hello @stan220, the change you are proposing is not valid for Espressif's official ESP32C6 dev kit, as there is RGB LED.
On the webpage you sent with the board informations, you have their example on how to use the LED. You can't use LED_BUILTIN, but you can specify LED pin in your code and use that instead:
https://wiki.icbbuy.com/doku.php?id=developmentboard:esp32-c3mini#flashing_led

@stan220
Copy link
Author

stan220 commented Jul 26, 2024

Hello @stan220, the change you are proposing is not valid for Espressif's official ESP32C6 dev kit, as there is RGB LED.

What are you taking about? My fix regarding ESP32C3 (not ESP32C6). Plz, leave a link to the guide for ESP32C3.

On the webpage you sent with the board informations, you have their example on how to use the LED. You can't use LED_BUILTIN, but you can specify LED pin in your code and use that instead: https://wiki.icbbuy.com/doku.php?id=developmentboard:esp32-c3mini#flashing_led

Plz, check out second example: https://github.com/MoonFox2006/ESP32C3_Wake_Demo/blob/main/src/main.cpp#L6.

BL, @P-R-O-C-H-Y, on ESP32C3 there is no 28 port at all. Could you please review PR more carefully once again.

@P-R-O-C-H-Y
Copy link
Member

Hello @stan220, the change you are proposing is not valid for Espressif's official ESP32C6 dev kit, as there is RGB LED.

What are you taking about? My fix regarding ESP32C3 (not ESP32C6). Plz, leave a link to the guide for ESP32C3.

Sorry the C6 was a typo, I meant the C3 of course. Link for the Espressif's ESP32C3-devkit-m:
https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-devkitm-1/user_guide.html#j3

On the webpage you sent with the board informations, you have their example on how to use the LED. You can't use LED_BUILTIN, but you can specify LED pin in your code and use that instead: https://wiki.icbbuy.com/doku.php?id=developmentboard:esp32-c3mini#flashing_led

Plz, check out second example: https://github.com/MoonFox2006/ESP32C3_Wake_Demo/blob/main/src/main.cpp#L6.

BL, @P-R-O-C-H-Y, on ESP32C3 there is no 28 port at all. Could you please review PR more carefully once again.
I did review it carefully, I have also run the Blink example to be sure it's working correctly on the ESP32C3.

The thing is, that as its RGB LED, you cannot just set the pin to HIGH or LOW. In order to control the RGB LED you need to use neopixelWrite function which uses RMT peripheral. For easiest use for the users, if the board have RGB LED instead of simple LED, the LED_BUILTIN is defined as LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;.
The SOC_GPIO_PIN_COUNT is there to go over the maximum pins available and later in the code, if you enter this pin as input, we are subtracting the SOC_GPIO_PIN_COUNT from the pin value.

Please take a look on our code in the Arduino-esp32 core:

@P-R-O-C-H-Y P-R-O-C-H-Y removed the Status: Review needed Issue or PR is awaiting review label Jul 26, 2024
@stan220
Copy link
Author

stan220 commented Jul 26, 2024

@P-R-O-C-H-Y understood, thanks for the clarification! although it looks a bit strange.

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.

4 participants