Hi There,
Need help in getting code for my PH sensor. Managed to work out DHT sensors Dallas 1-wire sensor and UltraSonic Sensor. But struggling to get the DFRobot PH sensor going. Found this code but getting junk result, the values don’t change. Either my sensor is faulty or more likely I’m using the wrong code. Can someone point me in the right direction.
Much Appreciated…
https://www.dfrobot.com/product-1025.html
esphome:
name: fish
platform: ESP32
board: nodemcu-32s
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "72e60d20083f62ae61b3aa2f685c360a"
wifi:
ssid: "xxxxxxx"
password: "xxxxxxx"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Fish Fallback Hotspot"
password: "lGgPMsXkk4uG"
captive_portal:
sensor:
# https://esphome.io/components/sensor/adc.html
- platform: adc
pin: GPIO35
id: ph
name: "pH Sensor"
update_interval: 1s
unit_of_measurement: pH
# https://esphome.io/components/sensor/index.html#sensor-filters
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 3
# Measured voltage -> Actual pH (buffer solution)
- calibrate_linear:
- 0.59 -> 7.0
- 0.71 -> 4.0