c9dof2
2.0.0.0
|
9DOF 2 Click is a compact add-on board for applications which require lowest power motion tracking and magnetometer functionality.
We provide a library for the 9dof2 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 9dof2 Click driver.
void c9dof2_cfg_setup ( c9dof2_cfg_t *cfg );
C9DOF2_RETVAL c9dof2_init ( c9dof2_t *ctx, c9dof2_cfg_t *cfg );
void c9dof2_default_cfg ( c9dof2_t *ctx );
void c9dof2_power ( c9dof2_t *ctx, uint8_t on_off );
void c9dof2_read_gyroscope ( c9dof2_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z );
void c9dof2_read_accelerometer ( c9dof2_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z );
This example demonstrates the use of 9DOF 2 Click board.
The demo application is composed of two sections :
Initalizes SPI and device drivers, performs safety check, applies default configuration and writes an initial log.
Reads the angular and acceleration rates and displays the values of X, Y, and Z axis on the USB UART each second.
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.