sparkfun / Qwiic_9DoF_IMU_ICM20948_Py

Python module for the SparkFun 9DoF IMU Breakout - ICM-20948 (Qwiic)
MIT License
31 stars 13 forks source link

Wrong values for accelerometer configuration #7

Open ezono-Muhammad opened 9 months ago

ezono-Muhammad commented 9 months ago

Subject of the issue

Wrong values for accelerometer configuration

Your workbench

Steps to reproduce

Using the following code :

from __future__ import print_function
import qwiic_icm20948
import time
import sys

if __name__ == "__main__":

    IMU = qwiic_icm20948.QwiicIcm20948(address=0x68)
    IMU.setBank(2)
    IMU._i2c.writeByte(IMU.address, IMU.AGB2_REG_ACCEL_CONFIG_1, 0x23)  
    register = IMU._i2c.readByte(IMU.address, IMU.AGB2_REG_ACCEL_CONFIG_1)
    print(register)

Expected behaviour

The return value should be 0x23

Actual behaviour

The return value is 0x01

image