Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Daim Duab Duab & Kev Sib Txuas
- Kauj Ruam 2: Kho Blynk los Saib Xyuas Kub thiab Vaum
- Kauj ruam 3:
Video: Saib Xyuas Kub thiab Vaum Nrog AM2301 ntawm NodeMCU & Blynk: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Nws yog qhov paub zoo heev tias feem ntau ntawm kev lag luam ntsug, qhov kub, av noo, siab, huab cua zoo, dej zoo, thiab lwm yam, ua si yam tseem ceeb yuav tsum tau saib xyuas tas li thiab tsim nyog ceeb toom tshuab yuav tsum tau nyob hauv qhov chaw thaum qhov txiaj ntsig mus deb ntawm qhov pib teeb tsa.
Cov qauv no yuav pab peb nkag siab cov txheej txheem los tshuaj xyuas qhov ntsuas kub thiab av noo siv "AM2301 Capacitive Digital Temperature & Humidity Sensor".
Tsim cov qauv no yog qhov yooj yim heev thiab yooj yim. Kuv vam tias cov lus qhia hauv "Kev Qhia Paub" no yuav pab cov nyeem nyeem kom pom meej ntawm nws qhov kev coj ua.
Khoom siv
- AM2301 Capacitive Digital Kub & Vaum Sensor
- D1 Mini V2 NodeMcu 4M Bytes Lua WIFI Internet Ntawm Yam Kev Txhim Kho Pawg Thawj Coj Raws ESP8266
- 170 pts Mini Breadboard SYB-170 Dawb
- Txiv neej Rau Poj Niam Jumper Hluav Taws Xob 40 Pcs 10cm
Kauj Ruam 1: Daim Duab Duab & Kev Sib Txuas
Cov kev sib txuas yog yooj yim heev thiab muaj raws li hauv qab no:
- 3V ntawm AM2301 txog 3V ntawm WeMos D1 Mini
- GND ntawm AM2301 txog GND ntawm WeMos D1 Mini
- Teeb liab Hlau (Daj) ntawm AM2301 txog D4 (GPIO 2) ntawm WeMos D1 Mini
Nco tseg: Txhawm rau tsim cov qauv no, peb yuav tsis xav tau daim ntawv qhia zaub mov vim peb tsuas muaj peb lub xov hlau los txuas. Kuv tso qhov kev xaiv rau tus nyeem ntawv ntawm daim ntawv no, seb puas yuav siv lub khob cij (lossis) tsuas yog txuas WeMos D1 mini nrog AM2301 ncaj qha nrog Jumper xov hlau.
Kauj Ruam 2: Kho Blynk los Saib Xyuas Kub thiab Vaum
Cov ntawv tshuaj ntsuam ib-qib-qib tau muab rau kev nkag siab zoo ntawm cov txheej txheem los teeb tsa Blynk. Cov neeg nyeem tau thov kom hla cov ntawv tshuaj ntsuam thiab muaj daim ntawv thov teeb tsa nrog ob ntu "Gauge", ib qho los sawv cev rau Cov Vaum thiab lwm qhov Kub.
Kauj ruam 3:
Pib ntawm Code >>>>>
#define BLYNK_PRINT Serial
#suav nrog SPI.h
#suav nrog ESP8266WiFi.h
#suav nrog BlynkSimpleEsp8266.h
#suav nrog DHT.h
char auth = "hQqK5jvA0h5JqubLnnpxV94eEltFbw1Y"; // Sau tus lej Auth uas tau xa los ntawm Blink
char ssid = "Smaragd25"; // Sau koj lub npe WIFI
char pass = "Smaragdine@2017"; // Sau koj li WIFI Password
#define DHTPIN 2 // Tus lej lej 4
// #define DHTTYPE DHT11 // DHT 11
// #define DHTTYPE DHT22 // DHT 22, AM2302, AM2321
#define DHTTYPE DHT21 // DHT 21, AM2301
DHT dht (DHTPIN, DHTTYPE);
BlynkTimer timer;
void sendSensor ()
{
ntab h = dht.readHumidity ();
ntab t = dht.readTemperature (); // lossis dht.readTemperature (muaj tseeb) rau Fahrenheit
yog (isnan (h) || isnan (t)) {
Serial.println ("Ua tsis tau zoo nyeem los ntawm DHT sensor!");
rov qab; }
Blynk.virtualWrite (V5, h); // V5 yog rau Vaum
Blynk.virtualWrite (V6, t); // V6 yog rau Kub
}
void teeb tsa ()
{
Serial.begin (9600); // Saib cov xwm txheej txuas hauv Serial Monitor
Blynk.begin (auth, ssid, dhau);
dht.begin ();
timer.setInterval (1000L, sendSensor);
}
void lub voj ()
{
Blynk.run ();
timer.run ();
}
Qhov kawg ntawm Txoj Cai >>>>>
Hauv cov cai saum toj no, tshwj xeeb tshaj yog nyob rau hauv #suav nrog nqe lus, thov suav nrog txhua cov ntaub ntawv header (uas xaus nrog.h txuas ntxiv) hauv "", lwm qhov chaws yuav cuam tshuam tsis raug.
Nco tseg: Yog tias koj tau xaiv Qhov Tsis Txaus Siab Kub thiab Vaum Cov Lus Qhia hauv cov cai, qhov txiaj ntsig koj tau txais yog qhov tsis raug (piv txwv piv txwv txuas nrog), txawm tias lub ntsuas cua ua haujlwm. Thov tawm tswv yim/tsis pom zoo cov kab hauv qab no kom tau raws li koj xav tau. Tsuas yog ib ntawm kab hauv qab no tsis txaus siab, so yuav tsum tau tawm tswv yim.
- #define DHTTYPE DHT11 // DHT 11
- #define DHTTYPE DHT22 // DHT 22, AM2302, AM2321
- #define DHTTYPE DHT21 // DHT 21, AM2301
Hauv kuv qhov xwm txheej, kuv tsis suav nrog kab kawg, piv txwv li: "#define DHTTYPE DHT21 // DHT 21, AM2301", thiab tau tawm tswv yim txog cov kab so.
Kom pom zoo dua, Kuv tau ntim ob qho tib si WeMos D1 Mini thiab AM2301 sensor hauv Styrofoam. Kuv tab tom npaj kom muaj cov ntaub ntawv acrylic txhawm rau ua kom zoo ua tiav cov cuab yeej ua tiav thiab ua rau nws saib zoo dua.
Yog tias muaj lus nug, thov sau rov qab rau [email protected] (lossis) ping kuv ntawm WhatsApp ntawm +91 9398472594. Kuv yuav zoo siab heev tau txais cov lus pom thiab txhim kho kuv cov ntawv.
Pom zoo:
ESP8266 Nodemcu Kev Ntsuas Kub Siv DHT11 ntawm Lub Vev Xaib Hauv Zos - Tau Chav Kub & Vaum ntawm Koj Tus Kheej: 6 Kauj Ruam
ESP8266 Nodemcu Kev Ntsuas Kub Siv DHT11 ntawm Lub Vev Xaib Hauv Zos | Tau Txais Chav Kub & Vaum ntawm Koj Tus browser: Nyob zoo cov neeg niaj hnub no peb yuav ua kom cov av noo & ntsuas xyuas qhov kub thiab txias siv ESP 8266 NODEMCU & DHT11 kub sensor. Kub thiab av noo yuav tau los ntawm DHT11 Sensor & nws tuaj yeem pom ntawm qhov browser uas lub vev xaib yuav tswj hwm
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: 5 Kauj Ruam
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: Lub DHT11 sensor tau siv los ntsuas kub thiab av noo. Lawv yog cov khoom siv hluav taws xob nrov tshaj plaws.Qhov DHT11 cov av noo thiab ntsuas kub ua rau nws yooj yim ntxiv cov av noo thiab ntsuas kub rau koj li DIY cov phiaj xwm hluav taws xob. Nws yog rau
Saib Xyuas thiab Sau Kub Nrog Bluetooth LE thiab RaspberryPi: 9 Kauj Ruam (nrog Duab)
Saib Xyuas thiab Sau Kub Nrog Bluetooth LE thiab RaspberryPi: Cov lus qhia no yog hais txog yuav ua li cas ua ke ntau qhov ntsuas kub ntsuas nrog Bluetooth LE sensor kab laum los ntawm Blue Radios (BLEHome) thiab RaspberryPi 3BT ua tsaug rau kev txhim kho ntawm Bluetooth LE tus qauv, muaj tam sim no tuaj yeem siv tau
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Kub Kub Nrog Steinhart-Hart Kho thiab Tswb Kub: 7 Kauj Ruam (nrog Duab)
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Ntsuas Kub nrog Steinhart-Hart Kev Kho thiab Tswb Kub: Tseem tab tom taug kev kom ua tiav "qhov haujlwm yuav los tom ntej", "ESP32 NTP Kev Ntsuas Kub Kev Ntsuas Kub Ua Noj Nrog Steinhart-Hart Kev Kho thiab Tswb Kub" yog Cov Ntawv Qhia qhia yuav ua li cas kuv ntxiv NTP ntsuas kub, piezo b