Control/Regulation using a accelerometer and 2 dc motors

Hi guys

Has anyone of you ever written a control/regulation for the arduino mega? I use the Adafruit ADXL345 accelerometer and two dc Motors with 12V.

I am using the motors similar to the ones of a quadrocopter. The are positioned left and right of my mainbody and should prevent roll movment

Can anyone assist me?