NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

teckel:
NewPing supports the ability to use one pin per sensor. You simply wire a single pin to the trigger and the echo pins on the sensor. That's it! In your sketch, you would set the trigger and echo pin as the same pin. The magic all happens in the library. It would look something like this:

NewPing sonar[SONAR_NUM] = {     // Sensor object array.

NewPing(10, 10, MAX_DISTANCE), // Each sensor's trigger pin, echo pin, and max distance to ping.
NewPing(11, 11, MAX_DISTANCE),
NewPing(5,  5, MAX_DISTANCE),
NewPing(7,  7, MAX_DISTANCE)
};




This would ping each device independently, and not all at once like you're doing now. The way you're doing it could cause bad echo problems.

Tim

Absolutely Fantastic!!!

Thank you Tim.