Adafruit_CircuitPython_BNO055 icon indicating copy to clipboard operation
Adafruit_CircuitPython_BNO055 copied to clipboard

Number of digit reported for accelerations ang gravity components are just two

Open dimitrigrigoriev opened this issue 2 years ago • 5 comments

Is it possible to increase the accuracy of the reported accelerations to at least 8 digits? It is currently just two digits, however, in a 2G mode 14 bit ADC should have an LSB value of 0.002395019531250m/s^2 and we are loosing information.

dimitrigrigoriev avatar Jan 16 '22 12:01 dimitrigrigoriev

can you be more specific about what you mean, you can print out the value iwth more digits of precision in arduino?

ladyada avatar Jan 16 '22 16:01 ladyada

Hi Ladyada, I am using Python driver on the Raspberry Pi. My output currently is: Gravity (m/s^2): (0.62, -0.42, 9.77) When I try to format the output with five digits it just gives extra zeros: 0.62000 It looks like the number of digits is limited when data is converted from binary to float.

dimitrigrigoriev avatar Jan 16 '22 17:01 dimitrigrigoriev

could be - that precision may not be available!

ladyada avatar Jan 16 '22 18:01 ladyada

OK, but is it possible to get raw output out in in binary or in dec? If yes than I can convert the the data into needed precision on a higher level using range and offeset data.

dimitrigrigoriev avatar Jan 16 '22 20:01 dimitrigrigoriev

https://github.com/adafruit/Adafruit_CircuitPython_BNO055/blob/main/adafruit_bno055.py#L859 thats where the response is read from i2c, so you just have to call bno._read_register(0x28, 6) to get the raw data from that register

ladyada avatar Jan 21 '22 00:01 ladyada

Closing. Looks answered.

caternuson avatar Nov 04 '22 15:11 caternuson