Adafruit 10-DOF IMU Breakout | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

Friday April 3rd, 2020
Support: LabJack engineers available through email and chat.
Shipping: We are processing and shipping all orders.
Stock: 55/56 products in stock. More details.
Supply Chain: Some disruptions. More details.

Adafruit 10-DOF IMU Breakout

This Lua script is useful as an example of how to combine I2C communication between many slave devices. This example utilizes a collection of I2C sensors, which are all available on the Adafruit 10-Degrees of Freedom Inertial Measurement Unit (10-DOF IMU, available here:

This example uses the following I2C Sensors: 

  • L3GD20H Triple-Axis Gyro
  • LSM303 Triple-axis Accelerometer**
  • LSM303 Triple-axis Magnetometer**

*The BMP180 Barometric Pressure Sensor was not implemented in this example because of Lua script limitations. See the BMP180 Lua script for more information.

**Although the LSM303 devices are in the same package, they behave as two separate devices. See the LSM303 Accelerometer & Magnetometer Lua Script for more information.

Each of the 3 sensors must be initialized over I2C (to configure parameters such as range, data rate, and low/high power mode.

To switch between devices, the I2C bus is configured for one address, and MB.W(5104, 0, yourNewI2CAddress) is used to switch between slave devices. Reconfiguring the bus with I2C.config() would work, but takes unnecessarily long.

For more information on each I2C sensor, visit their specific lua script example.

LabJack T7-Pro with L3GD20H and LSM303 utilizing the Adafruit 10-DOF IMU Breakout board
Image 1 - L3GD20H and LSM303 breakout board.

The 10 DOF board requires very few components to run, a 3.3V supply is provided by the LJTick-LVDigitalIO.

LabJack T7-Pro with L3GD20H and LSM303 utilizing the Adafruit 10-DOF IMU Breakout board
Image 2 - T7-Pro connected to Adafruit 10-DOF.

The accelerometer can be tested by rotating it at angles to the earth, where +1.0g and -1.0g can be measured. Below is a graph of the accelerometer data (X is white, Y is red, Z is green) as the module is rotated.

Lua Script Example Code