inclinometer 2.0.0.0
|
Inclinometer Click example. More...
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) |
int | main (void) |
Inclinometer Click example.
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 :
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 ).
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.
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |