c6dofimu 2.0.0.0
main.c File Reference

6DofImu Click example More...

#include "board.h"
#include "log.h"
#include "c6dofimu.h"

Functions

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

Detailed Description

6DofImu Click example

Description

This example showcases how to initalize and use the 6DOF IMU click. The click contains a 6-axis inertial measurement unit ( accelerometer + gyroscope ). After configuring the click module for proper use, axis and temperature data will be measured every second.

The demo application is composed of two sections :

Application Init

This function initializes and configures the click and logger modules. In order for the device to work well, proper data needs to be written to the measurement control registers as is done in the default_cfg(...) function.

Application Task

This function reads and displays temperature and accelerometer/gyroscope axis data from predefined registers. There is a 1 second delay between every read from the data output registers.

note: <WARNING> If you write data to any of the "reserved" register addresses, you can permanently damage the chip. If you are feeling adventurous, read the LSM6DS33 chip datasheet.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( )

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

◆ main()

int main ( void )