overflo23 / MH-Z19_MicroPython

MIT License
6 stars 4 forks source link

MH-Z19 CO2 Sensor from Winsen

MH-Z19B + MH-Z19C driver for MicroPython

This library implements a simple class to get data from the MH-Z19 Sensors

It will tell you

Author: Florian "overflo" Bittner - 12/2020

Projects

Twitter

Github

Version 0.1

License MIT

Some hints taken from: https://github.com/nara256/mhz19_uart/blob/master/src/MHZ19_uart.cpp

USE LIKE:

import mhz19

#init sensor on UART #1
sensor = mhz19.mhz19(1)

#update data from sensor
sensor.get_data()

print('ppm:',    sensor.ppm)
print('temp:',   sensor.temp)
print('status:', sensor.co2status)