Analog Read gives wrong value.
-
I am running a sketch on an ATOM Lite using GPIO 33 as an analog read pin. When connected to 3.3V (which actually measures 3.18V) it gives 4095 as expected. If connected to GND it gives 0 as expected. However if the voltage on GPIO33 is 3.11V it still shows 4095.
By my maths at 3.11V it should show 4004.
Any help appreciated.
-
The adc readings is non linear at both ends of range (flat). So you can't measure voltage below ~0.17V and under ~3.15.
Below is link with explain
https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/ -
Thank you very much for your reply. Very helpful.