ESP8266 D1 with DHT11 humidity & temperature sensor display values on a LCD screen
Автор: Electricum
Загружено: 2024-07-15
Просмотров: 78
Описание:
1. Hardware Requirements
ESP8266 D1 Mini Pro
DHT11 Temperature and Humidity Sensor
LCD 1602 Display (with I2C module)
Breadboard and jumper wires
Wiring Diagram
Connections for DHT11
VCC to 5v on the ESP8266
GND to G on the ESP8266
Data to D5 on the ESP8266
Connections for LCD 1602 (I2C)
VCC to 5V on the ESP8266
GND to G on the ESP8266
SDA to D2 on the ESP8266
SCL to D1 on the ESP8266
Libraries Required
Make sure you have the following libraries installed in your Arduino IDE:
LiquidCrystal_I2C In this version, I replaced lcd.begin() with lcd.init(), which is a common initialization method for the LiquidCrystal_I2C library.
DHT
You can install these libraries via the Library Manager in the Arduino IDE.
Steps
Wiring: Connect the DHT11 sensor and LCD 1602 display to the ESP8266 D1 Mini Pro according to the wiring diagram above.
Programming: Open the Arduino IDE and paste the code provided above.
Uploading: Select the correct board and port from the Tools menu and upload the code to the ESP8266.
Testing: Once the code is uploaded, the LCD should display the temperature and humidity readings from the DHT11 sensor.
This setup will allow you to monitor temperature and humidity using the DHT11 sensor and display the values on the LCD 1602 screen connected to your ESP8266 D1 Mini Pro.
Code: https://github.com/ukkokalevala/DHT11...
Schematic available with above codes
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: