HC-SR04 Ultrasonic gives big numbers

I ve got two HC-SR04 ultrasonic sensor. I am trying make a radar with that but before, I ve faced with a problem. When there is an stable object(simply a wall) sensor's output is changing. Actually it gives values more than its range. Its range is 400cm but sensor returns 2995 even thought there is no movement.This code is jsut for 1 sensor. I am gonna use to which are mounted on a servo motor and perpendicular to each other.

Things I have tried are supplying external voltage. Changing sensors, unmount from top of servo, trying across to different surface. What else can u suggest?

My Code is

#define ECHOPIN_A               40
#define TRIGPIN_A               10

long duration, duration2;

void setup() {
  Serial.begin(9600);
  pinMode(TRIGPIN_A, OUTPUT); // Sets the trigPin as an Output
  pinMode(ECHOPIN_A, INPUT); // Sets the echoPin as an Input

}

void loop() {
  float distance1 = calculateDistance(TRIGPIN_A,ECHOPIN_A);
  delay(50);

  Serial.print(distance1);
  Serial.print(" ");

  
  


}


float calculateDistance(int trig, int echo) {
  float distance;
  digitalWrite(trig, LOW);
  delayMicroseconds(2);
  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trig, HIGH);
  delayMicroseconds(10);
  digitalWrite(trig, LOW);
  duration = pulseIn(echo, HIGH); // Reads the echoPin, returns the sound wave travel time in microseconds
  distance = duration * 0.034 / 2;
  return distance;
}

The output values on serial monitor are like:

code isn't complete. Which library?
Try a short delay between readings

Code looks complete to me. No need to use a library for this simple sensor (but adding a timeout value to pulseIn() is a good idea).

The delay(50) plus time taken for the Serial.print() calls should be enough for echoes to die out.

Wiring firm? No loose contacts?

And credit for managing to get an image in your post, but it's much better if text output is given as text rather than as image of such text (use code tags to preserve formatting if needed).