|
1 | 1 | # Arduino esp8266 mh-z19 serial
|
2 | 2 |
|
| 3 | +[](https://travis-ci.org/jehy/arduino-esp8266-mh-z19-serial) |
| 4 | + |
3 | 5 | CO2, humidity and temperature sensor on ESP8266 with mh-z19 co2 sensor and dht-22 temperature and humidity sensor.
|
4 | 6 |
|
5 |
| -You can use project https://github.com/jehy/co2-online-display as backend to this program. |
6 |
| -See full description on https://geektimes.ru/post/270958/ (you can use Google translate from Russian). |
| 7 | +You can use project [https://github.com/jehy/co2-online-display](https://github.com/jehy/co2-online-display) as backend to this program. |
| 8 | +See full description on [https://geektimes.ru/post/270958/](https://geektimes.ru/post/270958/) (you can use Google translate from Russian). |
7 | 9 |
|
8 | 10 | # Compilation
|
9 | 11 |
|
10 |
| -All required libraries can be installed with Arduino IDE. |
11 |
| - |
| 12 | +All required libraries can be installed with Arduino IDE: |
| 13 | + |
| 14 | +## Via console: |
| 15 | + |
| 16 | +```bash |
| 17 | +arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs |
| 18 | +arduino --install-library "ArduinoJson:5.13.3" |
| 19 | +arduino --install-library "DHT sensor library:1.2.3" |
| 20 | +arduino --install-library "LiquidCrystal I2C:1.1.2" |
| 21 | +arduino --install-boards esp8266:esp8266 |
| 22 | + |
| 23 | +cp WiFiCreds.h.sample WiFiCreds.h # EDIT AFTER COP# Y! |
| 24 | +cp dataServer.h.sample dataServer.h # EDIT AFTER COPY! |
| 25 | + |
| 26 | +arduino --verify --board esp8266:esp8266:d1:CpuFrequency=80,FlashSize=4M3M arduino-esp8266-mh-z19-serial.ino |
| 27 | + |
| 28 | +``` |
| 29 | + |
| 30 | +## Manualy: |
| 31 | + |
12 | 32 | 1. Copy file `dataServer.h.sample` to `dataServer.h` and specify there your server address;
|
13 | 33 | 2. Copy file `WiFiCreds.h.sample` to `WiFiCreds.h` and specify there your WiFi cridentials;
|
14 | 34 | 3. Install [DHT sensor library](https://github.com/adafruit/DHT-sensor-library) version 1.2.3;
|
15 | 35 | 4. Install [ArduinoJson library](https://arduinojson.org/) v 5.13.3;
|
16 |
| -5. Install [LiquidCrystal_I2C library](https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library) v 1.1.2; |
17 |
| -6. Install [Adafruit unified sensor library](https://github.com/adafruit/Adafruit_Sensor) (required for DHT library); |
| 36 | +5. Install [LiquidCrystal_I2C library](https://github.com/marcoschwartz/LiquidCrystal_I2C) v 1.1.2; |
18 | 37 | 7. Compile and upload your sketch;
|
19 | 38 | 8. Enjoy!
|
20 | 39 |
|
|
0 commit comments