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-01-29
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Gas
Downloaded: 4159 times
Not followed.
License: MIT license
Ozone click – board with MiCS-2641 Ozone gas sensor.
Do you want to subscribe in order to receive notifications regarding "Ozone click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Ozone click" changes.
Do you want to report abuse regarding "Ozone click".
Library Description
The library covers all the necessary functions to control Ozone Click board. Ozone click communicates with the target board via SPI by reading raw digital ADC value from MCP3201 chip. This library contains drivers for read ADC value and for calculate measurement of PPB concentration of Ozon in air.
Key functions:
uint16_t ozone_getMeasurement()
- Get the ozone measurement function.float ozone_calcOzonePPB()
- Calculate concentration of Ozone function.Examples description
The application is composed of the three sections :
void applicationTask() { readValue = ozone_getMeasurement(); Delay_100ms(); ozonePPB = ozone_calcOzonePPB(); Delay_100ms(); IntToStr( readValue, logText ); ltrim( logText ); mikrobus_logWrite( " Read Value: ", _LOG_TEXT ); mikrobus_logWrite( logText, _LOG_LINE ); FloatToStr( ozonePPB, logText ); ltrim( logText ); mikrobus_logWrite( " Ozone PPB : ", _LOG_TEXT ); mikrobus_logWrite( logText, _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); Delay_1sec(); }
Other 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.