Skip to content
bennierex edited this page May 6, 2015 · 4 revisions

Basic Usage

>>> import navio
>>> nio = navio.Navio()
>>> # Read accelerometer and gyroscope data
>>> ((ax, ay, az), (gx, gy, gz)) = nio.IMU_get_motion6()
>>> # Read accelerometer, gyroscope and magnetometer data
>>> ((ax, ay, az), (gx, gy, gz), (mx, my, mz)) = nio.IMU_get_motion9()

Methods and properties

instance method IMU_get_motion6()

Gets IMU accelerometer and gyroscope data.

Returns: (tuple of tuples of floats) Accelerometer and gyroscope readings in the format ((ax, ay, az), (gx, gy, gz)).

instance method IMU_get_motion9()

Gets IMU accelerometer, gyroscope and magnetometer data.

Returns: (tuple of tuples of floats) Accelerometer, gyroscope and magnetometer readings in the format ((ax, ay, az), (gx, gy, gz), (mx, my, mz)).

Clone this wiki locally