Cov txheej txheem:

Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino: 6 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino: 6 Kauj Ruam (nrog Duab)

Video: Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino: 6 Kauj Ruam (nrog Duab)

Video: Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino: 6 Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino
Yuav Ua Li Cas Lub Chaw Huab Cua Yooj Yim Siv Arduino

Nyob Zoo Cov Menyuam, Hauv Cov Lus Qhia no kuv yuav piav qhia yuav ua li cas kom yooj yim huab cua chaw kom paub qhov kub thiab av noo siv DHT11 sensor thiab Arduino, cov ntaub ntawv nkag siab yuav tshwm ntawm LCD Zaub. Ua ntej pib qhov kev qhia no koj yuav tsum paub qee cov ntaub ntawv hais txog DHT11 sensor.

Yog xav paub ntxiv mus ntsib Electronics Projects Hub

Cia peb pib….

Kauj Ruam 1: Qhov Yuav Tsum Tau

Yam Yuav Tsum Tau
Yam Yuav Tsum Tau

DHT11

16 × 2 LCD Zaub

Arduino Ib

Txiv neej rau Poj Niam Jumper Xov - 8

Kauj Ruam 2: Txog DHT11 Sensor

Txog DHT11 Sensor
Txog DHT11 Sensor

DHT11 yog qhov ntsuas cua thiab qhov kub thiab txias. Nws tuaj yeem siv los ua cov ntsuas cua nrog rau qhov ntsuas kub. Koj tuaj yeem pom dht11 sensor ntawm 2 hom hauv khw. Ib qho yog nrog 4 tus pin thiab lwm tus yog nrog 3 tus pin. Hauv 3 tus pin dht11 sensor twb tau 10k Ohm resistor tau ntxiv rau hauv tus qauv. Qhov ua haujlwm ntawm qhov ntsuas no yog 3.3 V. Qhov tso tawm ntawm lub ntsuas no yog digital.

Kauj Ruam 3: Txuas DHT11 Nrog Arduino

Image
Image
Txuas DHT11 Nrog Arduino
Txuas DHT11 Nrog Arduino

Yog tias koj tab tom siv 4 tus pin DHT11 Kev Sib Txuas yog raws li hauv qab no

DHT11

Arduino UAS

Vcc 3.3v ua
Tawm PIN4 (Digital)
GND GND
NC --

Txuas 10K Ohm resistor ntawm Vcc thiab Out Pin ntawm DHT11.

Yog tias koj siv 3 tus pin DHT11 Kev Sib Txuas yog raws li hauv qab no

DHT11

Arduino UAS

Vcc 3.3v ua
Tawm PIN4 (Digital)
GND GND

Kauj Ruam 4: Txuas I2C LCD Zaub rau Arduino

Image
Image
Txuas I2C LCD Zaub rau Arduino
Txuas I2C LCD Zaub rau Arduino

Kuv twb tau qhia lawm yuav ua li cas txuas I2C LCD zaub rau Arduino

Koj tuaj yeem tshawb xyuas ntawm no

I2C LCD Arduino

GND GND

VCC 5 VV

SDA AW 4

SWB A5

Kauj ruam 5: Code

Code
Code

Koj yuav tsum suav nrog dht11 thiab I2C LCD tsev qiv ntawv. Koj tuaj yeem rub tawm hauv qab no.

Rub tawm DHT11 Library

Rub tawm I2C LCD Library

Download tau Arduino Code

#suav nrog

#suav nrog

#suav nrog

LiquidCrystal_I2C lcd (0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

dht DHT; #define DHT11_PIN 4

void teeb tsa () {

lcd.begin (16, 2); }

void voj () {

int d = DHT.read11 (DHT11_PIN);

lcd.setCursor (0, 0);

lcd.print ("Temp:");

lcd.print (DHT.temperature);

lcd.print ((kab ntawv) 223);

lcd.print ("C");

lcd.setCursor (0, 1);

lcd.print ("Vaum:");

lcd.print (DHT.humidity);

lcd.print ("%");

ncua (1000);

}

Kauj Ruam 6: Ua tiav Kev Tsim Kho thiab Ua Haujlwm

Tsis txhob hnov qab subscribe kuv tus YouTube Channel

Mus ntsib kuv lub vev xaib Electronics Projects Hub

Pom zoo: