c9dof2 2.0.0.0
main.c File Reference

9dof2 Click example More...

#include "board.h"
#include "log.h"
#include "c9dof2.h"

Functions

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

Variables

uint8_t id_val
 
float x_accel
 
float y_accel
 
float z_accel
 
float x_gyro
 
float y_gyro
 
float z_gyro
 

Detailed Description

9dof2 Click example

Description

This example demonstrates the use of 9DOF 2 Click board.

The demo application is composed of two sections :

Application Init

Initalizes SPI and device drivers, performs safety check, applies default configuration and writes an initial log.

Application Task

Reads the angular and acceleration rates and displays the values of X, Y, and Z axis on the USB UART each second.

Author
MikroE Team

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

◆ id_val

uint8_t id_val

◆ x_accel

float x_accel

◆ x_gyro

float x_gyro

◆ y_accel

float y_accel

◆ y_gyro

float y_gyro

◆ z_accel

float z_accel

◆ z_gyro

float z_gyro