ESP32 ADC2 worked yesterday, doesn't today with same-ish code
Posted: Thu Mar 31, 2022 5:02 am
Hey!
I'm pretty new to the world of embedded programming, and even newer to physical electronics, so I'm more than a little worried I perma-fried my new board!
I've put together a repository that I hope will explain my setup and code: https://github.com/tecywiz121/esp32-adc
The summary is that I'm trying to build a plant monitoring device with a couple sensors, and while I was developing yesterday I was able to read values from the Huzzah32's battery voltage pin and from the photoresistor. I moved on to coding up the 1-Wire temperature sensor, and when I came back to put it all together, the values I read from ADC2 are always the minimum. The battery voltage still works as far as I can tell.
I've checked that there's voltage going across the photoresistor, and if I put the pin in digital mode it switches from high to low if I put a bright light on it. That makes me think I somehow screwed up the ADC itself?
Thanks!
I'm pretty new to the world of embedded programming, and even newer to physical electronics, so I'm more than a little worried I perma-fried my new board!
I've put together a repository that I hope will explain my setup and code: https://github.com/tecywiz121/esp32-adc
The summary is that I'm trying to build a plant monitoring device with a couple sensors, and while I was developing yesterday I was able to read values from the Huzzah32's battery voltage pin and from the photoresistor. I moved on to coding up the 1-Wire temperature sensor, and when I came back to put it all together, the values I read from ADC2 are always the minimum. The battery voltage still works as far as I can tell.
I've checked that there's voltage going across the photoresistor, and if I put the pin in digital mode it switches from high to low if I put a bright light on it. That makes me think I somehow screwed up the ADC itself?
Thanks!