alcohol2 2.0.0.0
|
Alcohol 2 click is a very accurate ethanol gas (alcohol) sensor Click boardâ„¢, equipped with the SPEC amperometric gas sensor which electrochemically reacts with the ethanol.
We provide a library for the Alcohol2 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 Alcohol2 Click driver.
- Initialization function.void alcohol2_cfg_setup ( alcohol2_cfg_t *cfg );
ALCOHOL2_RETVAL alcohol2_init ( alcohol2_t *ctx, alcohol2_cfg_t *cfg );
void alcohol2_default_cfg ( alcohol2_t *ctx );
- This function reads one byte from the register.void alcohol2_write_byte ( alcohol2_t *ctx, uint8_t reg, uint8_t w_data );
uint8_t alcohol2_read_byte ( alcohol2_t *ctx, uint8_t reg );
uint16_t alcohol2_read_alcohol ( alcohol2_t *ctx );
The demo application gets Alcohol data and logs data to USBUART.
The demo application is composed of two sections :
Initializes device configuration.
Gets Alcohol (C2H5OH) data and logs data to USBUART every 500ms.
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.