We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-07-13
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Gas
Downloaded: 4600 times
Not followed.
License: MIT license
Alcohol 2 click is a very accurate ethanol gas sensor Click board, equipped with the SPEC amperometric gas sensor which electrochemically reacts with the ethanol.
Do you want to subscribe in order to receive notifications regarding "Alcohol 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Alcohol 2 click" changes.
Do you want to report abuse regarding "Alcohol 2 click".
Library Description
The library initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register. The library includes function for read Alcohol data.
Key functions :
uint16_t alcohol2_readAlcohol()
- Function for read Alcohol data
void alcohol2_writeByte( uint8_t reg, uint8_t _data )
- Function writes one byte to the register.
Example description
The application is composed of three sections:
void applicationTask()
{
Alcohol_Value = alcohol2_readAlcohol();
FloatToStr( Alcohol_Value, demoText );
mikrobus_logWrite( "Alcohol value : ", _LOG_TEXT );
mikrobus_logWrite( demoText, _LOG_LINE );
Delay_ms( 500 );
}
mikroE Libraries used in the example:
Additional notes and information
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.