-
Notifications
You must be signed in to change notification settings - Fork 23
Sample rate for accelerometer? #26
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
Comments
Reopening for further discussion. There are some additional features here that do not appear to be currently implemented. Others have requested these also. If there's a reason for not doing this, like making the library too big or something, then let's document it here at least. |
Hello, From the datasheet, it appears to me that in adafruit_lsm9ds1.py#L152, the gyroscope is set to continuous mode. In that same write, it looks as though the datarate is set to 952 hz (0xC0 or 11000000). If the first three parts of that binary string had an option selection like the acceleration ranges in L#166-191, that would be very beneficial. Additionally, the magnetometer datarate appears to never be set. From the datasheet, the continuous mode does not set a datarate for the magnetometer, and it's default datarate appears to be 10 hz. The key register would be REG1_M, which is already defined. I can do some work on this (mostly copying the user facing code for the ranges, and hopefully adapting them for the frequencies), but my unfamiliarity would require some oversight to make sure that what I propose makes sense. |
In response to this, I have added all the code that I think would be necessary. I haven't had a chance to test things yet, and I'm not even sure what level of tests would be necessary. Please see below for "my" version. |
Hi,
Is it possible to set the sample rate for the accelerometer? In the Arduino library there is a setting that can be altered, but I don't see the same in this library.
Thanks!
The text was updated successfully, but these errors were encountered: