ultrasonic distance sensor reading distance of 0.00

I've been trying to make a rover that moves based on how far away it is from the wall, but I've run into this problem where my Ultrasonic Distance Sensor(HY-SRF05) keeps on reading a distance of 0.00

Here is my Code:

#define ECHO 5
#define TRIG 4

void setup() {
 pinMode(TRIG, OUTPUT);
 pinMode(ECHO, INPUT);

void loop() {
 digitalWrite(TRIG, LOW);
 digitalWrite(TRIG, HIGH);
 digitalWrite(TRIG, LOW);

 double echoIn = pulseIn(ECHO, HIGH);
 double distInCm = (echoIn/2.0) / 29.1; 

It’s worth pointing out that pulseIn returns an unsigned long, not a double, and anyway, on the AVRs, a double is the same as a float.

Please remember to use code tags when posting code.

You may want to check your wiring.

I refactored my code to use unsigned longs instead of floats, and my wiring is correct; my sensor might just be dead, I guess

try adding a timeout so

unsigned long echoIn = pulseIn(ECHO, HIGH,10000000ul);