How to get a servo to stop with HC-SR04 ultrasonic sensor

Hey, I am trying to get a continious servo to stop when the ultrasonic sensors detects a object closer than 10 cm..and to start again when a new command tells it to rotate the other way. I am using 4 pieces of HC-SR04 sensors fitted on different sides of the project.
I was hoping someone could help me to get this working, i deleted the codes regarding the ultrasonic because all i could get was fault messages >:(

This is my current code:

#include <Servo.h>

Servo myservo; // create servo object to control a servo

int pos = 0; // variable to store the servo position
int incomingByte = 0; // for incoming serial data

void setup() {
Serial.begin(9600);
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {

// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();

// say what you got:
Serial.print("received: ");
Serial.print (incomingByte);
if(incomingByte == 108){
Serial.println(" sent 0 Rotaing CW ");
myservo.write(0);
}else if(incomingByte == 114){
Serial.println(" sent 180 Rotaing CCW ");
myservo.write(180);
}else if(incomingByte == 60){
Serial.println(" sent Stopped ");
myservo.write(60);
}else{
Serial.println(" moving Random");
myservo.write(incomingByte);
}

}

}

                if(incomingByte == 108){
                 Serial.println(" sent 0 Rotaing CW ");
                 myservo.write(0);
                }else if(incomingByte == 114){
                  Serial.println(" sent 180 Rotaing CCW ");
                  myservo.write(180);
                }else if(incomingByte == 60){

You can use 'l' instead of 108, so there is no need to look up what to send a month from now when you look at this sketch again.

i deleted the codes regarding the ultrasonic because all i could get was fault messages

So how are we supposed to tell you what was wrong? There are plenty of sites that have code for ultrasonic sensors, or you can just use the NewPing library.