Adafruit trinket pro 3v sensor servo code help?

The sensor I am using is the...
Pololu Carrier with Sharp GP2Y0D815Z0F Digital Distance Sensor 10 cm
And I am new to arduino coding so I am not Shure how I can make the code for it. I am pretty shure I connect the power pins (gnd and vcc) then I think I connect the trigger pin somewhere and then connect the power pins to the 360 servo in and then it should work if I have the right code.

  • code specifications....

I need the 10cm Sensors output to trigger two servos on a 6v 4 AA power supply (which I think is possible) then I need one servo to go backward 180 degrees and the other to go forward 180 degrees

If you can help me please comment below how, Thanks!