Eps32 Voltmeter is measuring incorrectly. For example, when the voltage is 12.00, it is 10.50. Measures -1.5 volts

I did a voltmeter with the Esp32, but 1.4 volts is missing measurement, I know how to fix it.
1k 10k.
can you help me

#define analogInput 36

float vout = 0.0;
float vin = 0.0;
float value = 0;
float R1 = 10000;
float R2 = 1000;
void setup() {

pinMode(analogInput, INPUT);


void loop() {
value = analogRead(analogInput);

  vout = (value * 3.3) / 4096.0;
  vin = vout / (R2 / (R1 + R2));



Hello, do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation of your ask).

I don't. The ESP32 is not famous for its precise ADC.

Thank you for your help

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.