Is it ok to use this sensor with esphome in 3-wire mode?
I’m thinking it might be ok, having read this paragraph in an online article:
In 3-Wire mode the single I/O pin is used as both an input and as an output. This is possible because there is never a time when both the input and output are being used. By eliminating one I/O pin requirement we can save a connection to our Arduino and use it for something else. It also is useful when using a chip like the ATtiny85 which has a limited number of I/O pins.
My intended example config for using it this way:
sensor:
- platform: ultrasonic
name: "Ultrasonic Sensor"
# use the same pin for the trigger and echo
trigger_pin: 26
echo_pin: 26
I’m not sure what the esphome code looks like and haven’t experimented with this.
Then, if I may also ask a second question: What is the unit provided by the sensor? It’s not quite clear to me from the docs whether it’s m or cm.