DFRobot / DFRobot_BMI160

MIT License
24 stars 22 forks source link

accelGyro example calls softReset() before I2C address assigned #8

Open dlkeng opened 11 months ago

dlkeng commented 11 months ago

On line 28 of the example file accelGyro.ini, the softReset() function is called before an I2C address has been assigned (which is done on line 34). However, the softReset() function incorrectly returns BMI_OK result even though it could not do the actual soft reset of the BMI160 since it had no I2C address to work with.

Achim1944 commented 6 months ago

I just found the same problem. The example accelGyro.ino runs without problems on a Nano, Pro Mini, etc., but it didn't run on the Raspi Pico. I could solve it by