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: 2019-10-09
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Gas
Downloaded: 3136 times
Not followed.
License: MIT license
NO2 2 Click is a gas sensor Click boardâ„¢, equipped with the MiCS-2714, a compact metal oxide (MOS) sensor. This sensor reacts to the presence of nitrogen dioxide (NO2) and hydrogen (H2).
Do you want to subscribe in order to receive notifications regarding "NO2 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "NO2 2 click" changes.
Do you want to report abuse regarding "NO2 2 click".
Library Description
The library includes functions for reading ADC value from device via SPI module. Function for converting ADC value to ppb and control over pht pin.
Key functions:
uint16_t no22_read_data ( void )
- Reads ADC value from devicefloat no22_get_ppb ( void )
- Converts ADC value to ppbuint8_t no22_set_pht_state ( uint8_t state )
- Sets state of pht pinExamples description
The application is composed of three sections :
void applicationTask()
{
uint16_t temp_data_read;
float data_ppb;
mikrobus_logWrite( "ADC : ", _LOG_TEXT );
temp_data_read = no22_read_data( );
WordToStr( temp_data_read, demo_text );
mikrobus_logWrite( demo_text, _LOG_LINE );
mikrobus_logWrite( "PPB : ", _LOG_TEXT );
data_ppb = no22_get_ppb( );
FloatToStr( data_ppb, demo_text );
mikrobus_logWrite( demo_text, _LOG_LINE );
mikrobus_logWrite( "___________________________", _LOG_LINE );
Delay_ms( 1000 );
}
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.