-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Analog Attenuation API? #87
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
Comments
Tried it and it did not work :) |
Heh, yes me too fiddling about in esp32-hal-adc and it didn't work for me either. Could I raise this as a bug with Espressif somewhere - (I don't properly understand how all the components fit together ) - is it hardware thing or the sdk or idf ...? |
it's either hardware or we are missing some setting in the software that I do not know about. You can raise an issue in esp-idf as lower level guys visit that repo :) |
Over here it was suggested to use adc1_config_channel_atten, thats seems to work ok. Its in #include <driver/adc.h> and can do: That seems to give a max input voltage of: Was hoping for a little wider range. |
no wonder... I was writing to the wrong register |
please try the latest commit analogSetAttenuation(ADC_0db);
analogSetPinAttenuation(A18, ADC_0db);
analogSetPinAttenuation(A19, ADC_2_5db);
analogSetPinAttenuation(A6, ADC_6db);
analogSetPinAttenuation(A7, ADC_11db); |
Thanks for the recently committed analog functions.
Is there a problem with analog attenuation or some reason why its not exposed as an API to Arduino sketches? Or is it coming soon perhaps?
The text was updated successfully, but these errors were encountered: