I'm running multiple ultrasonic sensors on one Arduino Uno, and I notice the frequency of sensor readings going down dramatically having multiple sensors in line like this. If I comment out three of the four sensors the speed goes up significantly, but I need all my sensors working.
Any ideas on how I can make sure this problem is gone? I can't work my code properly if it's only giving readings once every two seconds.
Are the sensors located near each other? With two (or more) sensors side-by-side, the second sensor may detect a late echo from the first one (the back wall, for instance) and it's a pretty dumb sensor: it will think that it's hearing its own ping and it will give you a result that's too small or wildly inconsistent.
Make sure the timeout on pulseIn() is set to something just slightly longer than the longest value you expect to measure. Then add extra delays if the sensors are likely to receive long echoes from earlier sensors.