- Notifications
You must be signed in to change notification settings - Fork18
CO2, humidity and temperature sensor on ESP8266
License
jehy/arduino-esp8266-mh-z19-serial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CO2, humidity and temperature sensor on ESP8266 with mh-z19 co2 sensor and dht-22 temperature and humidity sensor.
You can either use custom backed server to receive data in JSON or build in MQTT client to publish data to MQTT server.
You can use projecthttps://github.com/jehy/co2-online-display as backend to this program.See full description onhttps://geektimes.ru/post/270958/ (you can use Google translate from Russian).
All required libraries can be installed with Arduino IDE:
arduino --pref"boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefsarduino --install-library"ArduinoJson:6.14.1"arduino --install-library"Adafruit Unified Sensor:1.1.2"arduino --install-library"DHT sensor library:1.3.8"arduino --install-library"LiquidCrystal I2C:1.1.2"arduino --install-library"PubSubClient:2.8.0"arduino --install-boards esp8266:esp8266cp settings.sample.h settings.h# EDIT AFTER COPY!arduino --verify --board esp8266:esp8266:d1:CpuFrequency=80,FlashSize=4M3M arduino-esp8266-mh-z19-serial.ino
- Copy file
settings.sample.h
tosettings.h
and specify your settings; - InstallAdafruit Unified Sensor version 1.1.2;
- InstallDHT sensor library version 1.3.8;
- InstallArduinoJson library v 6.14.1;
- InstallLiquidCrystal_I2C library v 1.1.2;
- Compile and upload your sketch;
- Enjoy!
For Wemos D1, before compiling sketch:
- Add
http://arduino.esp8266.com/stable/package_esp8266com_index.json
to additional boards in preferences; - Select wemos D1 (or your other board) in boards manager and install it.
You can use config which looks like this:
sensor: -platform:mqttunique_id:esp-terrace-co2name:"ESP terrace CO2"state_topic:"esp/terrace/co2"qos:0unit_of_measurement:"ppm" -platform:mqttunique_id:esp-terrace-humidityname:"ESP terrace Humidity"state_topic:"esp/terrace/humidity"qos:0unit_of_measurement:"%" -platform:mqttunique_id:esp-terrace-temperaturename:"ESP terrace Temperature"state_topic:"esp/terrace/temperature"qos:0unit_of_measurement:"ºC"
About
CO2, humidity and temperature sensor on ESP8266
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.