ndirco2 2.0.0.0
|
NDIR CO2 click is an advanced integrated CO2 gas sensor system, which is able to measure an absolute CO2 concentration, by utilizing the CDM7160 integrated sensor.
We provide a library for the NDIRCO2 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 NDIRCO2 Click driver.
- Initialization function.void ndirco2_cfg_setup ( ndirco2_cfg_t *cfg );
NDIRCO2_RETVAL ndirco2_init ( ndirco2_t *ctx, ndirco2_cfg_t *cfg );
- Average Complete Check functionvoid ndirco2_read_co2 ( ndirco2_t *ctx, uint8_t set_check_mode, uint16_t *output_data );
uint8_t ndirco2_check_average_complete ( ndirco2_t *ctx );
void ndirco2_set_mode ( ndirco2_t *ctx, uint8_t select_mode );
This application measures absolute CO2 concetration.
The demo application is composed of two sections :
Initializes I2C driver and performs driver reset and determines number of averaging measurements.
Reads CO2 concentration data in ppm unit after each completed measurement. One measurement is finished after 300 ms, and period between two measurements is 2 seconds. Results of measurements logs on USBUART.
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.