Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gyro sampling rate #6

Open
applovinravi opened this issue Jan 20, 2015 · 1 comment
Open

Gyro sampling rate #6

applovinravi opened this issue Jan 20, 2015 · 1 comment

Comments

@applovinravi
Copy link

I am not sure whether this is a bug and if it is benign or if it is just a commenting error.

It seems for 100 Hz, the register setting should
be 0x67 and not 0x57.

I came across this while trying to port the Bias estimate and the madgwick filter to a Adafruit Flora, to get more stable reading.

// From the manual
//0 1 0 1 50 Hz 0 1 1 0 100 Hz

From Adafruit code:
write8(XMTYPE, LSM9DS0_REGISTER_CTRL_REG1_XM, 0x67);

From this code:
xmWriteByte(CTRL_REG1_XM, 0x57); // 100Hz data rate, x/y/z all enabled

@kriswiner
Copy link
Owner

Hi, this is probably just laziness on my part not changing the comment after changing the rate. The better way would be to paramatrize (gyroODR = gODR50Hz defined as 0x60, e.g. ) the rates and use the parameters instead.

The idea for these sketches is to provide a basic capability that the user (that's you!) would modify for a particular application. I'm glad to see people (you again!) using the sketches...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants