TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136733 times)
  2. FAT32 Library (69949 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46265 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26359 times)
  10. microSD click (25375 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

NDIR CO2 click

Rating:

5

Author: MIKROE

Last Updated: 2018-08-24

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Gas

Downloaded: 3720 times

Not followed.

License: MIT license  

NDIR CO2 click is an advanced integrated CO2 gas sensor system, which is able to measure an absolute CO2 concentration, by utilizing the CDM7160 integrated sensor.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "NDIR CO2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "NDIR CO2 click" changes.

Do you want to report abuse regarding "NDIR CO2 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
mikroBasic 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
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic 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 ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

NDIR CO2 click

NDIR CO2 click

Native view of the NDIR CO2 click board.

View full image
NDIR CO2 click

NDIR CO2 click

Front and back view of the NDIR CO2 click board.

View full image

Library Description

Library initializes and defines I2C driver and performs writing to registers and reading from registers. Also has the ability to measure CO2 concentration in ppm unit. For more details check the documentation.

Key functions:

  • uint8_t ndirco2_writeReg( uint8_t register_address, uint8_t transfer_data ) - Function writes one byte data to register.
  • uint8_t ndirco2_readReg( uint8_t register_address, uint16_t *dataOut ) - Function reads data from register.
  • void ndirco2_readCO2( uint8_t setCheckMode, uint16_t *outputData ) - Function reads 15-bit CO2 concentration data from data registers only when data is ready for reading after each measurement or after number of measurements determined by AVE register + 1.

Example description

The application is composed of three sections:

  • System Initialization -  Initializes peripherals and pins.
  • Application Initialization - Initializes I2C driver and performs driver reset and determines
    a number of averaging measurements.
  • Application Task - (code snippet) - Reads CO2 concentration data in ppm unit after each completed measurement. One measurement is finished after 300 ms, and the period between two measurements is 2 seconds. Results of measurements logs on USBUART.
void applicationTask()
{
 ndirco2_readCO2( _NDIRCO2_CHECK_EACH_MEASURE, &co2Data );
 WordToStr( co2Data, text );
 mikrobus_logWrite( "CO2 concentration is: ", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_TEXT );
 mikrobus_logWrite( "ppm", _LOG_LINE );
}


Other MikroElektronika libraries used in the example:

  • Conversions
  • I2C
  • UART

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB 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

TouchKey click

5

Touchkey click has four capacitive pads powered by TTP224, a touchpad detector IC. Capacitive buttons like these can be toggled even when placed under a layer of glass or paper. The example demonstrates the usage of TouchKey Click

[Learn More]

TV remote relay switch

1

This is a simple demonstration of using NEC protocol remote control with the IR click, Relay click and STM32 M4 clicker board. Upon a button press, an appropriate relay will toggle.

[Learn More]

Surface Temp click

0

Surface temp Click is high accuracy digital temperature sensor Click board™, offering breakthrough performance over a wide industrial range. It is equipped with the ADT7420 - an accurate 16-Bit Digital I2C temperature sensor from Analog Devices.

[Learn More]