TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 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 (136225 times)
  2. FAT32 Library (69492 times)
  3. Network Ethernet Library (55711 times)
  4. USB Device Library (45994 times)
  5. Network WiFi Library (41640 times)
  6. FT800 Library (40803 times)
  7. GSM click (28789 times)
  8. PID Library (26333 times)
  9. mikroSDK (26059 times)
  10. microSD click (25146 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: 3681 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

Pressure 6 click

0

Pressure 6 Click features a simple, yet highly accurate and reliable pressure sensor labeled as BM1386GLV, produced by ROHM. This sensor is a piezo-resistive pressure sensor with internal thermal compensation, which greatly simplifies the pressure reading.

[Learn More]

H-Bridge 9 click

0

H-Bridge 9 Click is a compact add-on board that contains six MOSFET half-bridge outputs. This board features the L99UDL01, a six-channel half-bridge driver monolithic integrated circuit that is PWM configurable and current regulated from STMicroelectronics.

[Learn More]

M-BUS Master click

5

The M-Bus Master is a Click board is complete solution for a master node in M-Bus networks. The M-Bus (&amp;quot;Meter-Bus&amp;quot;) is a new European standard for remote reading of heat meters and it is also usable for all other types of consumption meters as well as for various sensors and actuators.

[Learn More]