|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: FRC Java Implementation of the SparkFun 6 Degrees of Freedom IMU Digital Combo Bo
Usage:
In our Sensors class: private ADXL345_I2C_SparkFun m_accel; In our Sensors() constructor: m_accel = new ADXL345_I2C_SparkFun(I2C.Port.kOnboard, Accelerometer.Range.k16G);Methods to get Gyro data: public double getAngleX() { |
|
#2
|
|||
|
|||
|
Re: FRC Java Implementation of the SparkFun 6 Degrees of Freedom IMU Digital Combo Bo
Were you able to get the gyro to work and return an angle?
From what I understand from your code, its seems like you are just getting the rate of rotation. According to the datasheet, the GYRO_*OUT_* registers contain the rate of rotation. The gyro rate needs to be converted to degrees per second and then integrated to get the angle. I also worked on a driver for this gyro, but it seemed to be filtering out a lot of the readings, so I ended up with a lot of drift. This is how I did it: https://gist.github.com/lopsided98/ef6c0f8cacacad9d398b Last edited by Ben Wolsieffer : 31-01-2015 at 21:13. |
|
#3
|
|||
|
|||
|
Re: FRC Java Implementation of the SparkFun 6 Degrees of Freedom IMU Digital Combo Bo
We are still pretty early in our progress with this. What we do have is raw values from the registers for all three gyro orientations and all three acceleration vectors from this combo board showing up on our Smart Dashboard. When I change the orientation of the device I see a '~reasonable' change in the data. We still need to perform some test runs, gather data, and make sense of what we have.
I really appreciate your link. There are several concepts in your code that we will review and likely adopt. On one hand I wish I had your source three days ago. On the other hand it was a fun tour through an engineering problem with our students. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|