HC-SR04 not measuring distance

I am working on a obstacle avoiding robot. I am using HC-Sr04 to detect obstacles. And a SG90 servo to turn the sonar left and right. But no matter what I do i am always getting 0 as distance in serial monitor for all front_distance, right_distance, left_distance. I have attached my test code for checking the distance in different directions.

[code]
#include <Servo.h>
#include <NewPing.h>
int left_distance;
int right_distance;
int front_distance ;
Servo eye;
#define TRIGGER_PIN  2 
#define ECHO_PIN     3
#define MAX_DISTANCE 200
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
void setup() {
 Serial.begin(115200);
 eye.attach(4);
 pinMode(5, OUTPUT);
 pinMode(6, OUTPUT);
 pinMode(7, OUTPUT);
 pinMode(8, OUTPUT);
 pinMode(9, OUTPUT);
 pinMode(10, OUTPUT);
 

}

void loop() {
look_front();

look_right();

look_left();

Serial.print(front_distance);
Serial.print("  ");
Serial.print(right_distance);
Serial.print("  ");
Serial.print(left_distance);
Serial.println("  ");

}
void look_right()
{
  eye.write(10);
  delay(1000);
  right_distance =  readPing() ;
  delay(50);
  
}
void look_front()
{
  eye.write(90);
  delay(1000);
  front_distance =  readPing() ;
   delay(50);
  
}
void look_left()
{
  eye.write(170);
  delay(1000);
  left_distance = readPing();
   delay(50);
  
}

int readPing() { 
  delay(70);   
  unsigned int uS = sonar.ping();
  int cm = uS/US_ROUNDTRIP_CM;
  return cm;
}

[/code]

obsavo.ino (1.03 KB)

Uncompiled, untested.

#include <NewPing.h>

#define TRIGGER_PIN  2 
#define ECHO_PIN     3
#define MAX_DISTANCE 200
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

void setup() 
{
  Serial.begin(115200);
}

void loop() {
  Serial.println (readPing());
}


int readPing() { 
  delay(70);   
  unsigned long uS = sonar.ping();
  return uS/US_ROUNDTRIP_CM;
}

Report back.