I use Arduino UNO, HC-SR04 module and use the code from Arduino official Website to measure distance. But on serial monitor I always get "Distance = 0". I also review previous posts on this forum, but none of them give a clear idea. So I post again this problem.
Code works fine with my Uno and HCSR-04. Are you sure that the rangefinder is wired right (pin 3 to trigger, Pin 2 to echo) and the wires are good (check them with a DMM)?
@johnwasser@groundFungus I am surprised to see the knowledge of both of you about electronics. Unbelievable. You both were right. One of the connectors is defective. Thanks a lot, to both of you. Now my project works fine. Thanks again.