Ibrahim Seleem
Ibrahim Seleem

Reputation: 7

Connecting multiple IMU sensors to arduino DUE

I need to connect 5 IMU 9250 to Arduino Due. I used the library on this webpage and it works well for only one sensor.

https://www.switch-science.com/catalog/2845/

I need to know if there is a code or library that helps me to turn on all five sensors and get data at the same time.

Upvotes: 0

Views: 975

Answers (2)

Kentaro Okuda
Kentaro Okuda

Reputation: 1592

Besides I2C, MPU9250 has SPI interface. With SPI, you can connect multiple devices on the same bus. They share data out (shown as SDO in the data sheet), data in (SDI), and clock (SCLK). Each device has its own chip select (CS) pin. If you want to control 5 devices, you need 8 pins (SDO, SDI, SCLK + 5 CS).

With a quick search, I found a library that supports SPI. Maybe you can use it as it is. Or, you can study it and implement your own solution.

Upvotes: 1

Phil Haigh
Phil Haigh

Reputation: 4591

The board you are using only supports two possible i2c addresses so the maximum number of boards you can connect over a single i2c bus is two. The SparkFun hookup guide documents this in the "PTH Connections" section, the pin in question is labelled "AD0/SD0".

Upvotes: 1

Related Questions