inclinometer  2.0.0.0
Enumerations | Functions
main.c File Reference

Inclinometer Click example. More...

#include "board.h"
#include "log.h"
#include "inclinometer.h"

Enumerations

enum  inclinometer_example_t { EXAMPLE_AXIS = 1, EXAMPLE_ANGLE, EXAMPLE_TEMP }
 Example selector values. More...
 

Functions

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

Detailed Description

Inclinometer Click example.

Description

This example showcases ability of device to configure it for resolution and read Axis/Angle/Temperature data.

The demo application is composed of two sections :

Application Init

Initialization of the Host communication modules(UART, SPI). Sets default configuration where powe-up sequence is done with selecting MODE1 and enabling output on Angle channels. Read status and checks WhoAmI register. In the end example type is selected( for reading Axes, Angles or Temperature data ).

Application Task

Depending on the example type selected task is reading different data. If EXAMPLE_AXIS selected it reads 3 axes values in range of -1<->1g. If EXAMPLE_ANGLE is slected it reads 3 angle values in range of -90<->90deg. EXAMPLE_TEMP reads temperature data from device in degC.

Note
For Click board to work on ARM boards you need to pull-up MISO line.
Author
Luka Filipovic

Enumeration Type Documentation

◆ inclinometer_example_t

Example selector values.

Enum for selecting example type.

Enumerator
EXAMPLE_AXIS 
EXAMPLE_ANGLE 
EXAMPLE_TEMP 

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )