bussell
31-01-2015, 19:54
SERT Team 2521 has been experimenting with the new SparkFun 6 Degrees of Freedom IMU Digital Combo Board. Following an excellent article at http://bildr.org/2012/03/stable-orientation-digital-imu-6dof-arduino/ and sample code from here: http://wiki.oz9aec.net/index.php/6DOF_Digital_IMU we are now able to obtain both Gyro and Accelerometer data from this board.
The classes can be found here:
https://github.com/bussell/SparkFun6Dof
The big lesson learned was "correct addresses are key". The code in WPILIB for the ADXL345 had a hard-coded address that was not correct for this combo board. The only change I made to this file was the address. The gyro took some more care as it uses partial bytes for control data. My hack of a method for setting up the masks is nothing to be excited about, but it works.
Many thanks to the author of the original work published 7/31/2011 by Jeff Rowberg <jeff at rowberg dot net>. https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/ITG3200
- Joe Bussell
- Mentor Team 2521
The classes can be found here:
https://github.com/bussell/SparkFun6Dof
The big lesson learned was "correct addresses are key". The code in WPILIB for the ADXL345 had a hard-coded address that was not correct for this combo board. The only change I made to this file was the address. The gyro took some more care as it uses partial bytes for control data. My hack of a method for setting up the masks is nothing to be excited about, but it works.
Many thanks to the author of the original work published 7/31/2011 by Jeff Rowberg <jeff at rowberg dot net>. https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/ITG3200
- Joe Bussell
- Mentor Team 2521