Problem interfacing Razor 9DOF IMU to Arduino for Servo Control

Hi all,

I have been programming a feedback loop to serve as a automatic stability function on a RC helicopter. However, I am having problems connecting the Razor IMU to the Uno to control the servos of the helicopter. I am using this code for the AHRS: Tutorial · Razor-AHRS/razor-9dof-ahrs Wiki · GitHub, and added a tab for the feedback methods. My problem is that the servos will only run when the reset pin from the IMU is unplugged from the Arduino and even then they run a seemingly random jerking motion that gets faster before freezing at 90. On the serial port, it displays the angles correctly when the reset is plugged in, only the go to jibberish when the motor is moving. It then flips back and forth between the angles and nonsense until the motor stops, when it displays the format for the angles but with "nan" displayed instead. Can anyone give me an idea of what's going on, and any possible fixes?

Am I misunderstanding how exactly the IMU is using the Arduino? Anyway, thanks for any help you can give!