TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136537 times)
  2. FAT32 Library (69731 times)
  3. Network Ethernet Library (55841 times)
  4. USB Device Library (46173 times)
  5. Network WiFi Library (41801 times)
  6. FT800 Library (40986 times)
  7. GSM click (28921 times)
  8. PID Library (26384 times)
  9. mikroSDK (26277 times)
  10. microSD click (25298 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: 5398 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

Thermo 17 click

0

The Thermo 17 Click is a Click board™ based on the TMP451-Q1, a high-accuracy, lowpower remote temperature sensor monitor with a built-in local temperature sensor from Texas Instruments.

[Learn More]

Timer Calculator

41

Timer Calculator is a free software development tool used for easier calculation of timer interrupts. If you like Timer Calculator you can support further development by contributing on following page: http://www.mikroe.com/timer-calculator/#support

[Learn More]

I2C to CAN click

0

I2C to CAN Click is a compact add-on board that contains I2C to CAN-physical transceiver, which extends a single-master I2C bus through harsh or noisy environments. This board features the LT3960, a robust high-speed transceiver that extends a single-master I2C bus up to 400kbps using the CAN-physical layer from Analog Devices. One LT3960 from SCL and SDA I2C lines creates equivalent differential buses (CAN) on two twisted pairs, while the second LT3960 recreates the I2C bus locally for any slave I2C devices on the other end of the twisted pairs. A built-in 3.3V LDO powers both the I2C and CAN lines from a single input supply from 4V to 60V. This Click board™ is suitable for industrial and automotive networking, remote sensor applications, and more.

[Learn More]