I've been referencing https://docs.espressif.com/projects/esp ... dc_atten_t for setting up some ADC readings on ADC1, channel 0 and 7.
The problem I faced is likely just an error on the documentation site, or possibly user error, but basically I was using DC_ATTEN_DB_0 to set the scale to 0-800mV as suggested in the docs: https://docs.espressif.com/projects/esp ... ATTEN_DB_0 but my output voltage calculated with:
Code: Select all
float adpV = float(adpRaw)*(0.8/4095.0);
TLDR: I think the voltage range stated in the esp32 docs for ADC_ATTEN_DB_0 should be 0-1100mV not 0-800mV.
If I'm wrong I would love an explanation of what I misread. Thank you!