-
-
Notifications
You must be signed in to change notification settings - Fork 284
Please support calibrated accel & gyro in CurieIMU's API #149
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
Labels
Milestone
Comments
Hi @PaulStoffregen, so currently raw accelerometer data (for example) is grabbed with |
eriknyquist
added a commit
to eriknyquist/corelibs-arduino101
that referenced
this issue
Jul 17, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
eriknyquist
added a commit
to eriknyquist/corelibs-arduino101
that referenced
this issue
Jul 18, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
eriknyquist
added a commit
to eriknyquist/corelibs-arduino101
that referenced
this issue
Jul 21, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
eriknyquist
added a commit
to eriknyquist/corelibs-arduino101
that referenced
this issue
Jul 21, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
ndgbuilder
pushed a commit
that referenced
this issue
Jul 22, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
sgbihu
pushed a commit
to sgbihu/corelibs-arduino101
that referenced
this issue
Jul 29, 2016
Add implementations of readAccelerometer and readGyro which return values that are scaled according to the range set with setAccelerometerRange and setGyroRange
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please consider adding APIs for Arduino users to get properly scaled data, with the conversion factor done inside the CurieIMU library. There are at least two reasons why I hope you'll do this:
The library can "know" which range is in use, to automatically perform the scaling correctly. In the examples, like File > Examples > CurieIMU > Accelerometer, if a novice Arduino user edits line 36 to configure a wider range, they must also know/remember to edit line 69 to agree with their range setting. While this isn't very difficult for experienced programmers, reducing the possibility for things to go wrong, to make everything "just work" as simply as possible is the design style that makes Arduino so successful.
Over the long-term, this API is likely to be used with other sensors which are likely to have different scaling. By abstracting these hardware specific details and avoiding them within the user's code, the API can be much more useful over the very long term.
Probably the simplest approach would be functions with the same names which take references to float, and populate the floats with data properly scaled.
The text was updated successfully, but these errors were encountered: