Skip to content

analogReadResolution should be implemented #161

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

Closed
cbxbiker61 opened this issue Jan 31, 2017 · 2 comments
Closed

analogReadResolution should be implemented #161

cbxbiker61 opened this issue Jan 31, 2017 · 2 comments
Labels
Type: Feature request Feature request for Arduino ESP32

Comments

@cbxbiker61
Copy link

sam/samd/arc32 architectures use analogReadResolution to set the analogRead() bit resolution and it looks like this will be a "normal" api call.

I see analogSetWidth in esp32-hal-adc.h. It would be extremely easy to put a compatible analogReadResolution in that calls analogSetWidth.

Something to keep in mind is that analogReadResolution can be set up to 16 bits. If the bit resolution exceeds the ADC's actual capabilities, analogRead is expected to bit-shift the ADC's result to get a 16-bit result.

@me-no-dev
Copy link
Member

cool! Will look into it :)

@me-no-dev me-no-dev added the Type: Feature request Feature request for Arduino ESP32 label Feb 23, 2017
@me-no-dev
Copy link
Member

implemented in the latest master :)

me-no-dev pushed a commit that referenced this issue Oct 24, 2021
…ulotion() (#5776)

Function analogReadResolution set how many bits will analogRead return.

Find out that this functionality was added back 2017 by @me-no-dev in #161.

Related issues:
#5163
brentru pushed a commit to adafruit/arduino-esp32 that referenced this issue Oct 22, 2024
darkxst pushed a commit to darkxst/arduino-esp32 that referenced this issue Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

No branches or pull requests

2 participants