accelqvar  2.1.0.0
Macros | Functions
main.c File Reference

AccelQvar Click example. More...

#include "board.h"
#include "log.h"
#include "accelqvar.h"

Macros

#define ACCELQVAR_THOLD_DETECT_TOUCH   1.0
 
#define ACCELQVAR_TOUCH_ZERO   0.0
 
#define ACCELQVAR_THOLD_SENS   1.3
 

Functions

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

Detailed Description

AccelQvar Click example.

Description

This library contains API for the AccelQvar Click driver. The library initializes and defines the I2C and SPI drivers to write and read data from registers and the default configuration for reading the accelerator data and Qvar electrostatic sensor measurement.

The demo application is composed of two sections :

Application Init

The initialization of I2C and SPI module and log UART. After driver initialization, the app sets the default configuration.

Application Task

This example demonstrates the use of the AccelQvar Click board. Measures and displays acceleration data for the X-axis, Y-axis, and Z-axis [mg] and detects and displays a touch position and the strength of a touch. Results are being sent to the UART Terminal, where you can track their changes.

Author
Nenad Filipovic

Macro Definition Documentation

◆ ACCELQVAR_THOLD_DETECT_TOUCH

#define ACCELQVAR_THOLD_DETECT_TOUCH   1.0

◆ ACCELQVAR_THOLD_SENS

#define ACCELQVAR_THOLD_SENS   1.3

◆ ACCELQVAR_TOUCH_ZERO

#define ACCELQVAR_TOUCH_ZERO   0.0

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

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

void main ( void  )