TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Bugz Bensce (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 (137950 times)
  2. FAT32 Library (70759 times)
  3. Network Ethernet Library (56444 times)
  4. USB Device Library (46827 times)
  5. Network WiFi Library (42587 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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: 5653 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

H-Bridge 8 click

0

H-Bridge 8 Click is a compact add-on board that contains H-bridge current regulator. This board features the MP6519, a monolithic, step-down, current-source driver for applications that require accurate and fast current-response control from Monolithic Power Systems (MPS). It achieves excellent load and line regulation over a wide input supply range up to 28V. The four integrated MOSFET H-bridge control provide a fast dynamic load response and an ultra-high efficiency solution. Complete protection features include load open, load-short protection, over-current protection (OCP), over-temperature protection (OTP), and input over-voltage protection (OVP). This Click board™ is suitable as a current-regulator brushed DC motor/solenoid driver for various applications

[Learn More]

eFuse 7 click

0

eFuse 7 Click is a compact add-on board with a power path protection solution that limits circuit currents and voltages to safe levels during fault conditions. This board features the LS12052BD33, an eFuse with over-voltage protection and blocking FET control from Littelfuse.

[Learn More]

TempHum 20 click

0

Temp&Hum 20 Click is a compact add-on board that represents temperature and humidity sensing solution. This board features the CC2D23, a highly accurate, fully-calibrated relative humidity and temperature sensor from Amphenol. This sensor, characterized by its high accuracy (±2% from 20% to 80%RH (±3% over entire humidity range)) and high resolution, provides factory-calibrated 14-bit data to the host controller with a configurable I2C interface. It also comes with alarm features for preset control at a minimum and maximum humidity.

[Learn More]