Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dlkeng opened this issue Aug 15, 2023 · 1 comment · May be fixed by #9
Open

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

dlkeng opened this issue Aug 15, 2023 · 1 comment · May be fixed by #9

Comments

@dlkeng
Copy link

dlkeng commented Aug 15, 2023

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.

@krisstakos krisstakos linked a pull request Aug 19, 2023 that will close this issue
@Achim1944
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants