// Start continuous back-to-back mode (take readings as
// fast as possible). To use continuous timed mode
// instead, provide a desired inter-measurement period in
// ms (e.g. sensor.startContinuous(100)).
sensor.startContinuous();
}
void loop()
{
int distance =sensor.readRangeContinuousMillimeters();
//int distance =sensor.startContinuous(100);
Have a look at the Knob example in the IDE. That moves a servo in response to a potentiometer. There's not much difference between values read from a sensor and values read from a potentiometer so that should give you most of what you need.
"Help" means you make some attempt at writing it, post your attempt here and then we tell you how to get it working.
If you don't want to put any effort in yourself and just want someone to write a program for you try asking in the Gigs and Collaborations forum and be prepared to pay for it.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.