MPU 6050 not working with wifi communication on Arduino Due

Here is our code.

This is a project for school. We are making a Quadcopter.
We are realising this with qn Arduino Due with a wifi shield.
We are using the MPU6050 as gyroscope. were trying to reqd the dmp values.
Now our problem is the following:
The MPU6050 works fine untill we connect our Android client to the arduino due.
When we connect it, the MPU6050 gives invalid output. we assume this is because the mpu6050 needs more cpu time then the adruino due can give it. We tried to solve this by calculating the MPU values in a timer.
Then we realized we couldn't send commands because the CPU issent giving enought time to the listen to client method in our code...
does anyone have a solution for this?

spyDroneGyro.ino (17.7 KB)

does anyone have a solution for this?

Possibly, if it doesn't involve rubbish bin. Attach your code to your post.

You could also provide links to the WiFi shield (can't help you less we know that it is) and to what ever you are using to hook up the android.

Mark

sorry guys, code attached