co_2 2.0.0.0
|
CO 2 click is a very accurate, carbon-monoxide-gas-sensor Click boardâ„¢, equipped with the SPEC amperometric,3SP CO 1000 gas sensor which electrochemically reacts with the carbon monoxide (CO).
We provide a library for the CO2 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 CO2 Click driver.
- Initialization function.void co2_cfg_setup ( co2_cfg_t *cfg );
CO2_RETVAL co2_init ( co2_t *ctx, co2_cfg_t *cfg );
- Function puts the device to enabled or to disabled state.void co2_read_adc( co2_t *ctx, uint16_t *data_out );
void co2_enable( co2_t *ctx, uint8_t state );
co2_get_co2_ppm( co2_t *ctx, float *co2_data );
This application enables usage of very accurate CO sensor.
The demo application is composed of two sections :
Initializes I2C interface and performs the device configuration for properly working.
Gets CO (Carbon Monoxide) data as ppm value every 300 miliseconds. Results will be logged on UART. The CO value range is from 0 to 1000 ppm.
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.