sparkfun / SparkFun_ICM-20948_ArduinoLibrary

Arduino support for ICM_20948 w/ portable C backbone
Other
168 stars 72 forks source link

two interrupt #119

Closed JacksonLtt closed 1 year ago

JacksonLtt commented 1 year ago

How could I control two icm20948 both using interrupt with same i2c bus?

PaulZC commented 1 year ago

Hello Taiting (@JacksonLtt ),

It should be as simple as:

ICM_20948_I2C myICM0;
ICM_20948_I2C myICM1;

void setup()
{
  Wire.begin();
  myICM0.begin(Wire, 0);
  myICM1.begin(Wire, 1);

But I am not sure how you want to use interrupts? Please explain a little more.

Best wishes, Paul

PaulZC commented 1 year ago

Closing. Please reopen if you need more help with this.