smartdof 2.0.0.0
main.c File Reference

SmartDof Click example. More...

#include "board.h"
#include "log.h"
#include "smartdof.h"

Functions

void check_sensor_status ()
 
void accelerometer_task (smartdof_t *ctx, smartdof_sfc_t *sfc)
 
void magnetometer_task (smartdof_t *ctx, smartdof_sfc_t *sfc)
 
void gyroscope_task (smartdof_t *ctx, smartdof_sfc_t *sfc)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

SmartDof Click example.

Description

This click integrates a triaxial accelerometer, triaxial gyroscope and magnetometer. It can provide very accurate and precise 3D acceleration, magnetic, and angular velocity data, in real-time.

The demo application is composed of two sections :

Application Init

Initializes I2C driver and Smart DOF device

Application Task

Executes one of 'smartdof_xxx_task()' additional functions

note:

Additional Functions :
- accelerometer_task() - initializes accelerometer reports in 100000 micro second intervals, receives, parses and logs report data
- gyroscope_task() - initializes gyroscope calibrated reports in 100000 micro second intervals, receives, parses and logs report data
- magnetometer_task() - initializes magnetometer calibrated reports in 100000 micro second intervals, receives, parses and logs report data
Author
MikroE Team

Function Documentation

◆ accelerometer_task()

void accelerometer_task ( smartdof_t * ctx,
smartdof_sfc_t * sfc )

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ check_sensor_status()

void check_sensor_status ( )

◆ gyroscope_task()

void gyroscope_task ( smartdof_t * ctx,
smartdof_sfc_t * sfc )

◆ magnetometer_task()

void magnetometer_task ( smartdof_t * ctx,
smartdof_sfc_t * sfc )

◆ main()

int main ( void )