pimoroni / icm20948-python

Python library for the Pimoroni ICM20948 breakout
https://shop.pimoroni.com/products/icm20948
MIT License
50 stars 22 forks source link

Error gyro sample rate calculation #17

Closed ilouzl closed 3 years ago

ilouzl commented 3 years ago

The library uses 1100Hz as a reference for the sample rate divider value rate = int((1100.0 / rate) - 1) here The datasheet seems to be ambiguous between 1100Hz image and 1125Hz image

But in practice it looks like the actual number is 1125, because when you call set_gyro_sample_rate(rate=125) you actually get a 140Hz sampling rate.