c9dof 2.0.0.0
|
9DOF click carries ST’s LSM9DS1 inertial measurement module that combines a 3D accelerometer, a 3D gyroscope and a 3D magnetometer into a single device outputting so called nine degrees of freedom data...
We provide a library for the 9Dof Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for 9Dof Click driver.
- Initialization function.void c9dof_cfg_setup ( c9dof_cfg_t *cfg );
C9DOF_RETVAL c9dof_init ( c9dof_t *ctx, c9dof_cfg_t *cfg );
void c9dof_default_cfg ( c9dof_t *ctx );
- Get gyroscope data function.void c9dof_read_accel ( c9dof_t *ctx, c9dof_accel_data_t *accel_data );
void c9dof_read_gyro ( c9dof_t *ctx, c9dof_gyro_data_t *gyro_data );
void c9dof_read_mag ( c9dof_t *ctx, c9dof_mag_data_t *mag_data );
This application shows accelerometer, gyroscope and magnetometer axes values.
The demo application is composed of two sections :
Initializes GPIO pins, I2C, LOG modules and sets default configuration.
Gets accelerometer, gyroscope and magnetometer axes data and LOGs those values.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.