c13dof 2.0.0.0
Main Page

13DOF click

13DOF Click is an advanced 13-axis motion tracking Click boardâ„¢, which utilizes three different sensor ICs onboard: BME680, a digital gas, humidity, pressure and temperature sensor and BMM150, a geomagnetic sensor and a BMI088, small, versatile 6DoF sensor module. All integrated sensors ICs are made by Bosch Sensortec, featuring the state-of-the-art sensor technology processes, in order to fulfill the requirements for immersive gaming and navigation applications, which require highly accurate sensor data fusion.>

click Product page


Click library

  • Author : MikroE Team
  • Date : Dec 2019.
  • Type : I2C type

Software Support

We provide a library for the c13DOF 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.

Library Description

‍This library contains API for c13DOF Click driver.

Standard key functions :

  • Config Object Initialization function.

    ‍void c13dof_cfg_setup ( c13dof_cfg_t *cfg );

    - Initialization function.

    ‍C13DOF_RETVAL c13dof_init ( c13dof_t *ctx, c13dof_cfg_t *cfg );

  • Click Default Configuration function.

    ‍void c13dof_default_cfg ( c13dof_t *ctx );

Example key functions :

  • Function reads 16-bit X-axis, Y-axis data and Z-axis data.

    ‍void c13dof_bmi088_read_accel ( c13dof_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z );

    - Function read a sequential data starting from the targeted 8-bit register address.

    ‍C13DOF_BMI088_RETVAL_T c13dof_bmi088_accel_read_bytes ( c13dof_t *ctx, uint8_t *data_out, uint8_t reg_address, uint8_t n_bytes );

  • Function reads 16-bit X-axis, Y-axis data and Z-axis data of BMM150 sensor on 13DOF Click board.

    ‍void c13dof_bmi088_read_gyro ( c13dof_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z );

    Examples Description

‍This example displays values registered by sensors on click board.

The demo application is composed of two sections :

Application Init

‍Initialization driver enables - BME680 Low power gas, pressure, temperature & humidity sensor, BMI088 6-axis Motion Tracking Sensor and BMM150 Geomagnetic Sensor, also write log.

void application_init ( void )
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
C13DOF_MAP_MIKROBUS( cfg, MIKROBUS_1 );
c13dof_init( &c13dof, &cfg );
c13dof_default_cfg( &c13dof );
}
#define C13DOF_MAP_MIKROBUS(cfg, mikrobus)
Definition c13dof.h:67
C13DOF_RETVAL c13dof_init(c13dof_t *ctx, c13dof_cfg_t *cfg)
Initialization function.
void c13dof_default_cfg(c13dof_t *ctx)
Click Default Configuration function.
void c13dof_cfg_setup(c13dof_cfg_t *cfg)
Config Object Initialization function.
void application_init(void)
Definition main.c:59
Click configuration structure definition.
Definition c13dof.h:618

Application Task

‍This is a example which demonstrates the use of 13DOF Click board. Measures and display temperature in degrees Celsius [ C ], humidity data [ % ], pressure [ mbar ] and gas resistance data from the BME680 sensor. Measures and display Accel and Gyro data coordinates values for X-axis, Y-axis and Z-axis from the BMI088 sensor. Measures and display Geomagnetic data coordinates values for X-axis, Y-axis and Z-axis from the BMM150 sensor. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on usb uart changes for each second.

void application_task ( void )
{
log_printf( &logger, "----------------------------------------------------------\n");
log_printf( &logger, "Temperature : %.2f C \r\n", temperature );
log_printf( &logger, "Humidity : %.2f %% \r\n", humidity );
log_printf( &logger, "Pressure : %.2f mbar \r\n", pressure );
log_printf( &logger, "Gas Resistance : %ld \r\n", gas_res );
{
}
log_printf( &logger, "Accel X : %d ", accel_x );
log_printf( &logger, " Y : %d ", accel_y );
log_printf( &logger, " Z : %d \r\n", accel_z );
log_printf( &logger, "Gyro X : %d ", gyro_x );
log_printf( &logger, " Y : %d ", gyro_y );
log_printf( &logger, " Z : %d \r\n", gyro_z );
log_printf( &logger, "Mag X : %d ", mag_x );
log_printf( &logger, " Y : %d ", mag_y );
log_printf( &logger, " Z : %d \r\n", mag_z );
Delay_ms ( 1000 );
}
#define C13DOF_BMM150_DATA_READY
Definition c13dof.h:302
void c13dof_bmi088_read_accel(c13dof_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
Get BMI088 Accel X-axis, Y-axis and Z-axis function.
void c13dof_bmi088_read_gyro(c13dof_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
Get BMI088 Gyro X-axis, Y-axis and Z-axis function.
float c13dof_bme680_get_pressure(c13dof_t *ctx)
Gets BME680 pressure in degrees Celsius function.
float c13dof_bme680_get_humidity(c13dof_t *ctx)
Gets BME680 humidity in percentage [ % ] function.
uint32_t c13dof_bme680_get_gas_resistance(c13dof_t *ctx)
Gets BME680 gas resistance data function.
void c13dof_bmm150_read_geo_mag_data(c13dof_t *ctx, int16_t *mag_x, int16_t *mag_y, int16_t *mag_z, uint16_t *res_hall)
Get BMM150 Geomagnetic sensors data function.
float c13dof_bme680_get_temperature(c13dof_t *ctx)
Gets BME680 temperature in degrees Celsius function.
C13DOF_BMM150_RETVAL_T c13dof_bmm150_check_ready(c13dof_t *ctx)
Check BMM150 data ready status function.
int16_t mag_y
Definition main.c:52
int16_t accel_x
Definition main.c:45
uint16_t r_hall
Definition main.c:54
int16_t mag_z
Definition main.c:53
void application_task(void)
Definition main.c:85
float humidity
Definition main.c:43
int16_t gyro_y
Definition main.c:49
int16_t accel_y
Definition main.c:46
int16_t gyro_x
Definition main.c:48
int32_t gas_res
Definition main.c:44
int16_t gyro_z
Definition main.c:50
int16_t mag_x
Definition main.c:51
int16_t accel_z
Definition main.c:47
float pressure
Definition main.c:42
uint8_t ready_check
Definition main.c:55
float temperature
Definition main.c:41

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:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.13DOF

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.