airquality7 2.0.0.0
|
Air quality 7 Click is a compact add-on board that combines state-of-the-art MOS sensor technology with intelligent detection algorithms to monitor VOCs and CO2 equivalent variations in confined spaces.
We provide a library for the AirQuality7 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for AirQuality7 Click driver.
- Initialization function.void airquality7_cfg_setup ( airquality7_cfg_t *cfg );
AIRQUALITY7_RETVAL airquality7_init ( airquality7_t *ctx, airquality7_cfg_t *cfg );
- Get Revision function.airquality7_err_t airquality7_get_status( airquality7_t *ctx, uint16_t *tvoc_ppb, uint16_t *co2_ppm, uint32_t *res_val_ohm, uint8_t *err_byte );
airquality7_err_t airquality7_get_revision( airquality7_t *ctx, uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *ascii_code );
airquality7_err_t airquality7_get_r0_calib( airquality7_t *ctx, uint16_t *r0_kohm );
This demo application measures air quality.
The demo application is composed of two sections :
Initializes I2C driver and reads revision date of the module. If CRC check is OK allows the program to go on, otherwise, it displays a message that the program needs to be restarted.
Reads air quality status every 1500ms and shows the results on the USB UART.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.