quadcopter object avoidance using sharp ir sensors

Hi all, I want to make a quadcopter with obstacle avoidance using arduino. I want to make the quadcopter avoid objects and then let the controls again over to you, so not fully autonomous. I have the idea from this site. The sensors that i'm using are sharp 20-150cm from the arduino site. I have an arduino uno. The code's came with the site but there don't work when I plug the arduino into my flightcontroller. Please is there someone that could help me with the codes? I am new with arduino and not so experianced in programming. Thank you best regards, kamiel

The code's came with the site

What code would that be ?

Read this before posting a programming question

I can't give much input as far as the Arduino side of things, but I will say I built a quadcopter recently and if you're flying fast, 150cm isn't enough to stop and move over. You'd likely clip the object with a propellor or possibly even run into it.