Code help with digital distance sensor w/ servo

I am new to arduino code and dont know how to do this code but if anyone could help me that would be great!

anyways i am trying to use the...

Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm
and i am just using 2 normal 360 degree servo

what i want the code to do is when the sensor is triggerd (it dosent need code it already senses things when it sees something 10 cm away so i think you need to use the trigger pin) and it would trigger 2 servos one will go backwards 45 degrees and the other will go forward 45 degrees!

anyways if you can help me thanks!

(i do actully need thes cood between today and tommorow so im kind of in a tight schedule)

TORTLE_TECH:
(i do actully need thes cood between today and tommorow so im kind of in a tight schedule)

Then you'd better get to coding or head over to the Gigs and Collaborations section where you can hire someone to code for you. Here we help with the code *you * write. We don't just write your code for you.

It sounds like you just need to digitalRead that pin and set up an if statement to move your servo. Sounds pretty damn simple really. Have you looked at any of the Servo examles? Have you looked at ANY of the examples? Have you looked in the learning section of this site? How much have you tried so far?