Thanks for your reply. If you still have the arduino code for the control of Quadcopter, you probably can modify that to implement the PID controller. Perhaps you can discover valuable info in these links. I believe that the code in the 2nd link (with complete instructions) will be very useful to you.
If you want to do something professional, you have to drive your system model, then design a control block for that, it can be a simple feedback loop with PID control (which if you want, I can explain that for you too), then convert it to digital model and then write the code in Arduino Ide software.
BUT,
if you want to use other's source codes, it is best for you to see the links below (it contains the source code!):