mjackdk / AmbientCO2

Arduino library for CozIR Ambient CO2 sensors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AmbientCO2

Arduino library for CozIR Ambient CO2 sensors

The CozIR Ambient family of sensors all provide CO2 measurements, at different ranges. Some are able to measure temperature and relative humidity as well. The sensors use serial UART and analog voltage output.

This library has been developed using a CozIR Ambient 0-5000 ppm CO2 (only) sensor and an Arduino UNO R3 board.

Development

Milestone Features Version Status
Beta Basic reading 0.x.x ✔️
Launch Modes, settings 1.x.x
Sensors Range, CO2, relative humidity, temperature 2.x.x
Boards Arduino UNO, Due, MEGA 3.x.x

Library Documentation

Add the following line to use this libraray:

#include <AmbientCO2.h>

Functions

Name Parameters Returns Description
AmbientCO2() Stream &serial void Constructor
begin() none void Sensor setup
getCO2() none int Reads CO2 concentration in PPM

Limitations

From SoftwareSerial reference: If using multiple software serial ports, only one can receive data at a time.

Installation

Library Manager

  1. Open Tools -> Manage Libraries... in Arduino IDE
  2. Search for AmbientCO2
  3. Install latest version

Manual

  1. Download library zip file from GitHub, and extract it
  2. Rename resulting folder from AmbientCO2-master to AmbientCO2
  3. Move folder AmbientCO2 into the Arduino IDE libraries folder
  4. Restart Arduino IDE, if running

Usage

  1. Examples are available under File -> Examples -> AmbientCO2 in Arduino IDE
  2. Change rxPin and txPin in the sketch to match board setup
  3. Connect GND, 3.3V, rxPin and txPin between board and sensor (see User's Manual, page 7, for sensor pinout)
Board Sensor
GND Pin 1
3.3V Pin 3
rxPin Pin 7
txPin Pin 5
  1. Upload sketch
  2. Open Serial Monitor or Serial Plotter in Arduino IDE

Sensor Documentation

Inspiration

Arduino Libraries

Generic Arduino Libraries

About

Arduino library for CozIR Ambient CO2 sensors

License:MIT License


Languages

Language:C++ 100.0%