This code makes heavy use of Martin Crown's code on the diydrones.com forum. His sketch is based on Jeff Rowberg’s MPU6050 I2C library. The MPU6050 used in the original sketch however is the little brother of the MPU6000 in the Invensense lineup and only supports I2C. Martin’s sketch is a port of Jeff’s sketch that also uses the DMP, but takes advantage of the SPI port instead of I2C.
The on chip Digital Motion Processor (DMP) contained within the MPU6000 can generate 6-axis quaternion data, which is the fused data of the accelerometer and the gyroscope sensors. Roll, pitch and yaw angles can be extracted from the quaternion data and this happens directly on the IMU processor. This alleviates some of the processing load from the flight controller.
I have since adapted Martin’s code adding/removing/modifying as necessary. The IMU communicates with the flight controller board via I2C, sending messages whenever new orientation data is available.
Martin’s code remains compatible with the Teapot demo (a Processing visualization sketch) which can be very useful for testing/debugging visually. To run the Teapot demo on the PC, you’ll need to have Processing installed and copy an additional toxiclibs library into Processing’s workspace’s libraries folder. I've uploaded a video of the ArduIMU working with the Teapot Processing demo. http://www.benripley.com/diy/arduino/implementing-a-quadcopter-imu/
In order to program the ArduIMU v3 board, you need an FTDI Cable. An FTDI cable is a USB to Serial (TTL level) converter which allows for a simple way to connect TTL interface devices to USB.