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

Aylee:
Hello, thank you very much for your contribution! I have a problem in my project. I have a car, Arduino + L293D shield. I have connected 4x ultrasonic sensors on pins: 3,4,5,6. I have put a delay of 60ms and 5s in setup.

However, the front sensor measures are like 12,12,12,0,12,12,0,12,12... etc a sensor from left measures 0,0,0,0,0,18,0,0,0,18. How could I make a consistent measurment? Some of the sensors are measuring good, some have a lot of zeros.

I need the car to avoid obstacles in its way. Thank you.

Not enough information to help. But, I would first guess that your sensors are not compatible with the one pin method or you didn't install the capacitor (you don't specify the sensor, circuit, nor code, so who knows).

Also, you're over-complicating things if you're having a problem. SIMPLIFY when you have a problem. If I were you, I would have just one sensor and use two pins (trigger and echo pins). See if that works, if it does, see what it takes to make it fail, then you've found your problem.

In any case, it seems you just need some basic deductive reasoning to isolate what the problem is.

Tim