I’m new to ESPHome and YAML. I’m trying to build a pool filter pressure monitor using an ESP32. I’m able to customize and write to my ESP32 using a mix of Konnected base yaml and some of my own. I can not get my ADC sensor to compile w/o errors. I get “preparation failed” and the following errors…
@RH_Dreambox and I guess I’m a little confused… If I’m applying an analog input signal to any of the ADC inputs, can’t I just declare or type a sensor as “adc”. New to ESP but based on a lot of examples of pressure sensors - it seems it should be straight forward.
@Steve_Campbell
Have you connected the sensor to a voltage divider to lower the input signal to the voltage that the ESP32 can handle, i.e. max 3.3V ?
Then the lowest input signal should be slightly lower than 0.5V.
The calibration should then be…
0.X → 0.0
3.3 → 20.0
And does the error message stop if you remove the sensor code?
If not, there is a problem with the rest of your code, the one above the heading “esphome:”.
FYI: I removed the Konnected bit and wrote my own ESP from scratch and learned a lot. The error went away :). I have a working ESP32 with 4 relays and now just need to get the voltage divider completed and actual pressure sensor connected instead of potentiometer. Thanks.