airquality8 2.0.0.0
main.c File Reference

AirQuality8 Click example. More...

#include "board.h"
#include "log.h"
#include "airquality8.h"

Functions

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

Detailed Description

AirQuality8 Click example.

Description

This library contains API for Air Quality 8 Click driver. The library initializes and defines the I2C bus drivers to write and read data from registers. The library also includes a function for configuring sensor and measurement, read and calculate mox resistance ( RMOX ) and air quality index ( AQI ), etc.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART, and additional pins. After the driver inits and executes a default configuration, the app read product ID and configuration parameters, initializes the sensor and measurement.

Application Task

This is an example that demonstrates the use of the Air Quality 8 Click boardâ„¢. In this example, the app performs the start of the measurement, reads an array of the 15 mox resistances measurements ( RMOX ), and calculates the air quality index ( AQI ), the app also, displays if an error occurs. Results are being sent to the Usart Terminal where you can track their changes.

Additional Function

  • static void display_error ( void )
Author
Nenad Filipovic

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

int main ( void )