SPI Data Transmission:

To place the IMU in SPI (serial peripheral interface) slave data transmission mode, pins 11, 12, and 13 of the Arduino must be used. The fourth wire may be connected to any availabe Arduino digital I/O pin (ie pins 2-10). In the photo below, pin 8 is used.

The photo below shows:
  • Arduino pin 11 connected to the IMU SDI pin
  • Arduino pin 12 connected to the IMU SDO pin
  • Arduino pin 13 connected to the IMU SCK pin
  • Arduino pin 8 connected to the IMU SSL pin
Note that the photo shows the IMU z axis pointing upwards so the roll angle is close to 180 degrees when the example code is run.

To run the example, cut and paste the code example into a .ino file and compile it in your Arduino environment.

To see the output, open the Arduino serial monitor and set the baud rate to 57600.