I've started to play with the pretty nice Cozir CO2 sensor from GSS. This relates to research projects on air quality control.
For testing purpose, the sensor is connected to my computer through a USB-serial converter cable. In order to communicate with the sensor (e.g. grab the CO2 concentration data), I've written a bit of Python code to wrap the low-level ASCII communication protocol into a higher level, more compact API.
For example, instead of exchanging byte codes, reading the temperature becomes:
>>> from cozir import Cozir >>> c = Cozir('/dev/ttyUSB0') >>> c.read_temperature() 20.5
For people that might be interested, all the details and the code are on the Github repository: https://github.com/pierre-haessig/pycozir
Also, the repo contains a basic logging program that can be customized to anyone's needs. Tested for now with Python 2.7, on Linux and Windows.