ESP32 ADC always reads 4095
Posted: Thu Jan 03, 2019 6:24 pm
Hi All,
New here and not seeing any way to post code, apologies if I am getting up your noses already!
Anyway, I have a Wemos D32 ready to deploy, deep sleeps for most of the time but should check IO35 on wake-up to alarm in case of low battery. Seems that any time I read Vbatt I get full scale 4095 on the ADC? No errors, just 4095 irrespective of battery volts?
on the REPL I get...
>>> import machine
>>> adc = machine.ADC(machine.Pin(35))
>>> adc.read()
4095
Same result any time I call the adc.read() function in my code?
Is the ADC broken in the esp32 port at the moment or am I possibly messing with a fake board with no voltage divider on IO35?
Anybody else come across this?
Many thanks in advance
Garry
New here and not seeing any way to post code, apologies if I am getting up your noses already!
Anyway, I have a Wemos D32 ready to deploy, deep sleeps for most of the time but should check IO35 on wake-up to alarm in case of low battery. Seems that any time I read Vbatt I get full scale 4095 on the ADC? No errors, just 4095 irrespective of battery volts?
on the REPL I get...
>>> import machine
>>> adc = machine.ADC(machine.Pin(35))
>>> adc.read()
4095
Same result any time I call the adc.read() function in my code?
Is the ADC broken in the esp32 port at the moment or am I possibly messing with a fake board with no voltage divider on IO35?
Anybody else come across this?
Many thanks in advance
Garry