HC-SR04 sensors not outputting logical results :(

During this time, the sensors were not moved at all. These are some of the results that outputted. They are repeating, seemingly random numbers that make no sense in the context. Please see attached for the uploaded code!

Left distance is
0 in.
Right distance is
0 in.
Left distance is
35 in.
Right distance is
55 in.
Left distance is
3 in.
Right distance is
54 in.
Left distance is
34 in.
Right distance is
53 in.
Left distance is
34 in.
Right distance is
54 in.
Left distance is
34 in.
Right distance is
53 in.
Left distance is
35 in.
Right distance is
55 in.
Left distance is
35 in.
Right distance is
55 in.
Left distance is
34 in.

Does anyone know what the issue is here? Thanks!

Independent_Project.ino (1.22 KB)

Does anyone know what the issue is here?

Connect the sensor power and ground to 5V and Ground, not two digital pins.

The trigger pin is set LOW in setup. There is no need to set it LOW again in loop(). After setting it HIGH, you set it LOW. Setting it LOW before setting it HIGH is not necessary.

Are the two sensors aimed away from each other?

I had a similar issue with my autonomous wall-avoiding robot, which powered the sensor as well as a servo (which scanned it back and forth) from the same breadboard. The solution was to power the sensor and the servo separately, I.e., the sensor is powered off the 5V pin on the arduino and the servo gets power from a 5V pin on the motor driver board. Not sure why this is, but it worked for me.

Maybe a small capacitor across the servo power leads would help, has anyone tried that?