ITG3200 not wroking how i need them too

Hello,
I previously posted in the robotics thread with an issue I am having with getting my Quadcopter to function correctly.

The problem is that when the arduino board/flight Controller is hooked up via USB to the cp, everything works fine. However when I plug in the battery, the Motors will not respond to the RC or PID calculations anymore. They won’t arm at all.

However, when I comment out the sensor_update part, the Motors react just fine once again to the RC controls (with the battery plugged in).

here is the sensor code ( and ITG3200 library will be attatched to post):
void gyro_Init () {
Wire.begin();
gyro.init(ITG3200_ADDR_AD0_LOW);

Serial.print(“zeroCalibrating…”);
gyro.zeroCalibrate(2500, 2);
Serial.println(“done.”);
}

void update_Gyro () {

//Reads calibrated values in deg/sec
gyro.readGyro(&roll_input,&pitch_input,&yaw_input);
Serial.print(“X3:”);
Serial.print(roll_input);
Serial.print(" Y:");
Serial.print(pitch_input);
Serial.print(" Z:");
Serial.println(yaw_input);

I thank you in advance for your help.

}

ITG3200.cpp (11.1 KB)

ITG3200.h (8.76 KB)