is it possible to use one pin for trigger and echo?
I could connect trigger and echo pin to the same pin and switch from OUTPUT to INPUT on that pin after triggering.
How would the SR04 react on an IN signal on the echo pin?
I assume it doesn't work - as nobody suggested it so far.
If someone can/wants to add some informaiton or experience ...
Thanks
Robert
It won't work with normal ultrasonic sensor libraries. NewPing is specifically written to control sensors using only one pin. NewPing's 1-pin support is only available in a pre-release build which can be downloaded at the bottom of the following linked message:
As I'm getting positive feedback on it working, I'll probably be making a release version later today. In addition to 1-pin support, NewPing is faster (both ping speed and with the use of port registers for pin manipulation/reading), produces smaller sketches (from port registers and discrete commands), and has a method using timers to produce event-driven sketches (say goodbye to "delay" commands that slow your robot down).
thanks for the reply. I'll test it when the sensors are in. Ordering from China they cost barely 2$ these days. But 3 weeks shipping can pull your nerves