bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

docs: Add accelerometer range and units #584

Closed microbit-sam closed 5 years ago

microbit-sam commented 5 years ago

The measurement is given in milli-Newtons, for example +/- 2g will return +/- 2000mN.

microbit-carlos commented 5 years ago

As you mention, since the range of values will be dependent on the accelerometer sample range configured, could we add a short note about that relationship between the sample range and the range of values returned by these methods?

https://github.com/lancaster-university/microbit-dal/blob/v2.0.0-rc10/source/drivers/MicroBitAccelerometer.cpp#L263-L283

It's true that MicroPython doesn't currently expose a way to change it, so the default of 2g is used, but it would be useful to have in the docs in case the method is added.

Also looking at the DAL docs it sounds like the units is milli-g?

microbit-sam commented 5 years ago

👍

microbit-carlos commented 5 years ago

Thank you Sam!