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.
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
removing the statement ‘Wire.begin()‘ from the constructor of DFRobot_BMI160.cpp
and move it to the setup() routine of accelGyro.ino
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.