TOP Contributors

  1. MIKROE (2660 codes)
  2. Alcides Ramos (356 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137015 times)
  2. FAT32 Library (70142 times)
  3. Network Ethernet Library (56029 times)
  4. USB Device Library (46353 times)
  5. Network WiFi Library (41968 times)
  6. FT800 Library (41295 times)
  7. GSM click (29060 times)
  8. mikroSDK (26496 times)
  9. PID Library (26452 times)
  10. microSD click (25423 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Air quality 4 click

Rating:

5

Author: MIKROE

Last Updated: 2018-01-29

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Gas

Downloaded: 5438 times

Not followed.

License: MIT license  

Air quality 4 click uses for measurement of H2, TVOC, CO2 and EthOH concentracion in air.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Air quality 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Air quality 4 click" changes.

Do you want to report abuse regarding "Air quality 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Air quality 4 click

Air quality 4 click

Native view of the Air quality 4 click board.

View full image
Air quality 4 click

Air quality 4 click

Front and back view of the Air quality click board.

View full image

Library Description

Initializes and defines I2C bus driver and driver functions which perform measurements of H2, TVOC, CO2 and EthOH (Ethanol) concentration in the air. Check the documentation for more details.

Key functions

void air_quality4_measureQuality(uint8_t *readAir) - The function writes 6 bytes CO2 data (2 bytes) and TVOC data (2 bytes) with CRC data for each of them to a buffer, pointed by the function parameter.

void air_quality4_getCO2AndTVOC(uint16_t *value) - The function writes 2 bytes CO2 data and 2 bytes TVOC data without CRC data to a buffer, pointed by the function parameter.

void air_quality4_measureSignal(uint8_t *readAir) - The function writes 6 bytes H2 data (2 bytes) and EthOH - Ethanol data (2 bytes) with CRC data for each of them to a buffer, pointed by the function parameter.

void air_quality4_getH2AndEthOH(uint16_t *value) - The function writes 2 bytes of H2 data and 2 bytes of EthOH data without CRC data to a buffer, pointed by the function parameter.

Examples Description

  • System Initialization - Initializes peripherals and pins. Application Initialization - Initializes click driver and gets ID data.
  • Application Task - Performs measurements of air concentration for H2, EthOH(Ethanol), CO2 and TVOC data. Results of the measurement are output to the UART.
void applicationTask()
{
    air_quality4_getH2AndEthOH(&data_buffer[0]);

    IntToStr(data_buffer[0], text);
    mikrobus_logWrite("H2 value is: ", _LOG_TEXT);
    mikrobus_logWrite(text, _LOG_LINE);

    IntToStr(data_buffer[1], text);
    mikrobus_logWrite("EthOH value is: ", _LOG_TEXT);
    mikrobus_logWrite(text, _LOG_LINE);

    air_quality4_setBaseline();

    air_quality4_getCO2AndTVOC(&data_buffer[0]);

    IntToStr(data_buffer[0], text);
    mikrobus_logWrite("CO2 value is: ", _LOG_TEXT);
    mikrobus_logWrite(text, _LOG_LINE);

    IntToStr(data_buffer[1], text);
    mikrobus_logWrite("TVOC value is: ", _LOG_TEXT);
    mikrobus_logWrite(text, _LOG_LINE);

    Delay_ms(1000);
}

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.

 

ALSO FROM THIS AUTHOR

AN to PWM 2 click

0

AN to PWM 2 Click is a compact add-on board that contains an easy-to-use component that converts the value of the input analog signal to a fixed frequency PWM voltage output, with a duty cycle proportional to the input voltage. This board features the LTC6992CS6, a silicon oscillator with an easy-to-use analog voltage-controlled pulse width modulation (PWM) capability from Analog Devices. It features the PWM signal controlled by analog input in range of -2.5V to 2.5V, frequency range up to 1 MHz, frequency error less than 1.7%, and it has good temperature stability. It has many features that make it well suited for heater control, PWM servo loops, LED dimming, signal isolation, and other duty cycle control applications.

[Learn More]

mikromedia for XMEGA - Examples

5

Set of examples for mikromedia for XMEGA.. Provided examples demonstrate working with mikromedia's various features and modules:

- Accelerometer
- MMC SD card
- MP3
- Serial Flash
- TFT
- Touch Panel
- USB UART

[Learn More]

Magneto 5 click

5

Magneto 5 click is a very accurate and reliable magnetic sensor device, which features the MEMSIC MMC34160PJ, a 3-axis magnetic sensor IC.

[Learn More]