airquality9 2.0.0.0
main.c File Reference

AirQuality9 Click example. More...

#include "board.h"
#include "log.h"
#include "airquality9.h"

Functions

void airquality9_display_status_validity (uint8_t status)
 Air Quality 9 display status validity function.
 
void airquality9_display_aqi_uba (uint8_t aqi_uba)
 Air Quality 9 display aqi uba function.
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

AirQuality9 Click example.

Description

This example demonstrates the use of Air Quality 9 click board by reading and displaying outputs such as eCO2, TVOC and AQI in compliance with worldwide IAQ standards.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger and performs the click default configuration.

Application Task

Waits for the new data interrupt which triggers once per second, and then reads the validity status, TVOC, eCO2, and AQI-UBA values. All values are being displayed on the USB UART where you can track their changes.

Author
Stefan Filipovic

Function Documentation

◆ airquality9_display_aqi_uba()

void airquality9_display_aqi_uba ( uint8_t aqi_uba)

Air Quality 9 display aqi uba function.

This function parses the Air Quality Index per UBA (AQI-UBA) value and displays it on the USB UART.

Parameters
[in]aqi_uba: AQI-UBA value.
Returns
None.
Note
None.

◆ airquality9_display_status_validity()

void airquality9_display_status_validity ( uint8_t status)

Air Quality 9 display status validity function.

This function parses the status validity from status byte and displays it on the USB UART.

Parameters
[in]status: Data status byte.
Returns
None.
Note
None.

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