-
Notifications
You must be signed in to change notification settings - Fork 11
Return acceleration as meter per second per second #12
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
According to the page above, there is calibration data at 1g stored in the Nunchuk |
Interesting. Thanks! Gave that a quick test and it does seem to nominally work. Can use the 0g and 1g info to come up with a slope/offset to apply to the raw counts. Copying info here in case information disappears into internet ether:
|
Unfortunately, it looks like not all nunchuks have that information. With an original nunchuk: >>> nc._read_register(b"\x20")
bytearray(b'yyy \xad\xad\xad\x1b') With a 3rd party clone: >>> nc._read_register(b"\x20")
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') Could easily check for this, but not sure what a good fall back behavior would be for nun's without cal info. |
Acceleration is currently returned as raw values. If a conversion can be found, use that to update returns to m^s to comply with CP Design Guide:
https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html#sensor-properties-and-units
The text was updated successfully, but these errors were encountered: