c6dofimu2 2.0.0.0
main.c File Reference

6DofImu2 Click example More...

#include "board.h"
#include "log.h"
#include "c6dofimu2.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

c6dofimu2_accel_data_t accel_data
 
c6dofimu2_gyro_data_t gyro_data
 

Detailed Description

6DofImu2 Click example

Description

6DOF IMU 2 Click is capable of precise acceleration and angular rate (gyroscopic) measurement.

The demo application is composed of two sections :

Application Init

Application Init performs Logger and Click initialization.

Application Task

This is an example which demonstrates the usage of 6DOF IMU 2 Click board. It measures accel and gyro coordinates (X,Y,Z) and then the results are being sent to the UART Terminal where you can track their changes for every 1 sec.

note: Default communication that is set is I2C communication. If you want to use SPI, you have to set up the cfg structure. Also, after uploading your code on development board it needs HW Reset ( button on Board ) so the values would be properly read.

Author
Mihajlo Djordjevic

Function Documentation

◆ 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 )

◆ main()

int main ( void )

Variable Documentation

◆ accel_data

◆ gyro_data