Skip to content

docs: Correct ADC default resolution statement for ESP32-S2 #11653

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eMUQI
Copy link
Contributor

@eMUQI eMUQI commented Jul 27, 2025

Description of Change

This PR corrects the documentation for analogReadResolution by removing an incorrect statement that the ESP32-S3 default ADC resolution is 13 bits.

As confirmed by the function's own documentation in the core header file esp32-hal-adc.h, the default resolution for analogRead is 12 bits (producing a range of 0-4095).

Tests scenarios

Compiled and run on Seeed Studio XIAO ESP32S3 in version v3.3.0. By running the standard AnalogReadSerial example code, confirmed that the default output range is 0-4095, corresponding to 12-bit resolution.

Related links

https://docs.espressif.com/projects/arduino-esp32/en/latest/api/adc.html#analogreadresolution

/*
* Set the resolution of analogRead return values. Default is 12 bits (range from 0 to 4096).
* If between 9 and 12, it will equal the set hardware resolution, else value will be shifted.
* Range is 1 - 16
*
* Note: compatibility with Arduino SAM
*/
void analogReadResolution(uint8_t bits);

https://github.com/espressif/esp-idf/blob/346870a3044010f2018be0ef3b86ba650251c655/components/soc/esp32s3/include/soc/soc_caps.h#L129-L130

@eMUQI eMUQI requested a review from pedrominatel as a code owner July 27, 2025 12:13
Copy link
Contributor

github-actions bot commented Jul 27, 2025

Messages
📖 🎉 Good Job! All checks are passing!

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


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for 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 6cc7a63

@lucasssvaz lucasssvaz requested a review from P-R-O-C-H-Y July 27, 2025 16:07
Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

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

Hi @eMUQI, I have checked the code and you are right about the S3. The documentation should say that for S2! Can you please instead of removing it change the S3 to S2? Thanks

@P-R-O-C-H-Y P-R-O-C-H-Y added the Type: Documentation Issue pertains to Documentation of Arduino ESP32 label Jul 28, 2025
@eMUQI eMUQI changed the title docs: Remove incorrect statement on ESP32-S3 default resolution docs: Correct ADC default resolution statement for ESP32-S2 Jul 28, 2025
@eMUQI
Copy link
Contributor Author

eMUQI commented Jul 28, 2025

Hi @P-R-O-C-H-Y , thanks for the review and clarification!
I've updated the PR as you suggested. Could you please take another look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Issue pertains to Documentation of Arduino ESP32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants