-
Notifications
You must be signed in to change notification settings - Fork 222
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
async
ADC read
#1643
Comments
Based on a quick skimming of the TRM (for the C6, at least) it appears that this should be possible by configuring Also thank you for pointing this out, this is very valuable feedback! It's easy to overlook things like this :) |
I just stumbled upon this problem. I wanted to have an embassy wifi example returning its battery status and nb::block does not look like it can be used. |
I also don't know much about the specific operation of adc. I want to ask, can't we simply use the current read_oneshot to encapsulate a future? I will post an example later. Update: |
I'm wondering if we could have the ADC own all the pins it needs? That might make it easier to do asynchronous stuff, but it might complicate the type declaration. |
Hi,
I'm not so deep in the esp32's internals and also not in the code of the HAL, but I wondered if the ADC reading could be made
async
.If I read the docs correctly, one basically has to use
nb::block
for a read, probably wasting a few hundred/thousand cycles in the process.The text was updated successfully, but these errors were encountered: