Sonar Sensor stops working

Hi

I bought two cheap Hobbyking sonar sensors last year.
The arduino could read very accurate distance values with the newPing library.

Now I needed them for a project and they seem to be broken.
When I connect the triger-Pin I can hear some silent clicking. (which should be a positive sign)
The values on the serial Monitor are changing between constantly and the real distance doesnt seem to influence them.
I tested it with different example codes from different websites on 3 different arduinos and 2 sensors.
I just cant believe that those sensors are broken, they worked once and were stored safely.

To start with post a link to the sensor, your code, and a photo of how you hooked them up.

The sensor is a standard sr-04:

Just one of the sketches I tried, this one prints “Out of range” or random values:

#define trigPin 12
#define echoPin 13

void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}

void loop() {
  int duration, distance;
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(1000);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
  if (distance >= 200 || distance <= 0){
    Serial.println("Out of range");
  }
  else {
    Serial.print(distance);
    Serial.println(" cm");
  }
  delay(500);
}

Well, sometimes the simplest things can cause the biggest problems.
One of my jumper wires had a bad contact.
While I tried it with different PCs, Arduinos and Modules I didn't think of that.
It may be the cause for a lot of seemingly broken hardware lately. :cold_sweat: