Skip to content

LUA library for reading values from MQ-135 air quality sensor via ESP8266 with NodeMCU

License

Notifications You must be signed in to change notification settings

tricoos/m135-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQ135 LUA Library for ESP8266 / NodeMCU

LUA library for reading values from MQ-135 air quality sensor via ESP8266 with NodeMCU

As I didn't find any library for accessing the MQ-135 measurements with LUA I wrote this library with is essentially a copy of the C library from GeorgK for Arduino.

Connection to NodeMCU

This library has been tested with the MQ-135 sensor board by Flying-Fish which contains a resistor and a digital output.

Simply connect the board (1) to the NodeMCU (2) unit ike this:

  • GND to GND
  • VCC to 3V3
  • AO to AO

Calibration And Burn-In

Before you can use the sensor you are advised to "burn in" the sensor by having it powered on for 24 hours. After this time use the calibrate.lua script to get an average value for RZero after putting the board outside for 30 to 60 minutes and writing down the average RZero value shown.

Usage

Just check the MeasureAirQuality.lua script on how to use it. You don't have to modify the library as you can simply override the default values for your sensor programmatically.

Links

About

LUA library for reading values from MQ-135 air quality sensor via ESP8266 with NodeMCU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages