I am trying out Micropython with the nrf52840 Xiao Sense. Just tried to read from the IMU, however I can’t seem to get a reading. The most simple example:
>>> from machine import Pin, SoftI2C
>>> Pin.board.IMU_PWR.value()
1
>>> i2c = SoftI2C(scl=Pin.board.IMU_SCL, sda = Pin.board.IMU_SDA)
>>> i2c.scan()
[]
IMU_PWR is 40, and I verified that the Micropython port is already setting it to high on boot.
IMU_SCL is 27
IMU_SDA is 7
I also tried i2c.readfrom_mem(0x6A, 0x0F, 1)
and i2c.readfrom_mem(0x6B, 0x0F, 1)
, which both return ENODEV
Anyone able getting the imu to work with Micropython? BTW, I tried both a readily available firmware from MicroPython - Python for microcontrollers as well as building it myself with default settings.
Thanks.