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-16
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Gas
Downloaded: 4475 times
Not followed.
License: MIT license
NO2 click is a very accurate nitrogen-dioxide gas sensor Click board, equipped with the SPEC amperometric gas sensor which electrochemically reacts with the nitrogen-dioxide (NO2).
Do you want to subscribe in order to receive notifications regarding "NO2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "NO2 click" changes.
Do you want to report abuse regarding "NO2 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 NO2 data in ppm and function for read ADC data.
Key functions :
float no2_getNO2ppm()
- Function for read NO2 Data in ppm
uint16_t no2_readADC()
- Function for read ADC sensor data
void no2_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()
{
NO2_Value = no2_getNO2ppm();
FloatToStr( NO2_Value, demoText );
mikrobus_logWrite( "NO2 value : ", _LOG_TEXT );
mikrobus_logWrite( demoText, _LOG_TEXT );
mikrobus_logWrite( " ppm", _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.