BMI160-Arduino icon indicating copy to clipboard operation
BMI160-Arduino copied to clipboard

I2C Initialization

Open Satientas58 opened this issue 3 years ago • 4 comments

Dear Sir/Madam,

I have utilized the code and patched it according to the configuration. However, I am unable to initialize the I2C using "BMI160.begin(BMI160GenClass::I2C_MODE, i2c_addr);".

May I check whether there is a solution to this?

Thank you.

Satientas58 avatar Mar 31 '21 08:03 Satientas58

I have the exact same issue, the module will not initialise on I2C or SPI, it gets stuck on init call

Kanken6174 avatar Dec 05 '21 11:12 Kanken6174

Actually this was solved by using PlatformIO instead of the arduino IDE, no idea what happend there 🤷

Kanken6174 avatar Dec 05 '21 12:12 Kanken6174

Hi, I have the same problem on arduino and on platformio I still get stuck on initialisation.

mtruma avatar May 17 '22 14:05 mtruma

Whoever finds this problem here is how I solved it: add at the beginning of void setup() Wire.begin();

and function BMI160.begin(BMI160GenClass::I2C_MODE, i2c_addr); should be BMI160.begin(BMI160GenClass::I2C_MODE, Wire, i2c_addr); second argument in function should be Wire

Either example needs to be fixed or source.

mtruma avatar May 17 '22 20:05 mtruma