Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Xav Tau
- Kauj Ruam 2: Teeb UP Arduino IDE rau ESP32 Boards
- Kauj Ruam 3: Txhim Kho Tsev Qiv Ntawv
- Kauj Ruam 4: Kev Sib Txuas
- Kauj ruam 5: Code
- Kauj Ruam 6: Tso Tawm
Video: 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
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 qhov ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab muab tso rau ntawm cov zaub ntawm m5stick-C. So hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & cua sov ntsuas los ntawm DHT11 thiab luam tawm ntawm m5stack m5stick-C siv Arduino IDE. Yog li ntawd peb yuav ua qhov ntsuas kub ntsuas nrog m5stick C thiab DHT11.
Kauj Ruam 1: Yam Koj Xav Tau
Rau txoj haujlwm no koj yuav xav tau cov khoom hauv qab no: 1-m5stick-C pawg thawj coj txhim kho 2- DHT11 Kub sensor3-Ob peb jumper xov hlau 4-Hom C usb cable rau Programming
Kauj Ruam 2: Teeb UP Arduino IDE rau ESP32 Boards
Nco ntsoov tias koj tau teeb tsa ESP32 cov laug cam hauv koj Arduino IDE thiab yog tias nws tsis yog li ntawd, thov ua raws li cov lus qhia hauv qab no kom ua li ntawd: ESP32 BOARDS INSTALL:
Kauj Ruam 3: Txhim Kho Tsev Qiv Ntawv
mus rau koj Arduino IDE tom qab ntawd mus rau Sketch> suav nrog Tsev Qiv Ntawv> Tswj Tsev Qiv. Tom qab txhim kho cov tsev qiv ntawv DHT no, ntaus "Adafruit Unified Sensor" hauv lub npov tshawb nrhiav thiab nqes mus. lub tsev qiv ntawv thiab teeb tsa nws thiab koj npaj txhij rau code.
Kauj Ruam 4: Kev Sib Txuas
Cov kev sib txuas tau yooj yim heev DHT11 tus pin 1 (tus lej cim tus pin): yuav txuas nrog G26 ntawm m5stick-CDHT11 tus pin 2 (VCC): yuav mus rau 3v3 tus pin ntawm m5stick-CDHT11 tus pin 3 (GND): yuav mus rau GND tus pin m5stick -C
Kauj ruam 5: Code
Luam cov cai hauv qab no los ntawm kev piav qhia thiab xa nws mus rau koj lub m5stick-C pawg tswj hwm kev txhim kho: // Piv txwv ntsuas kos rau ntau yam DHT cov av noo/ntsuas kub#suav nrog "M5stickC.h" #include "DHT.h" #define DHTPIN 26 // dab tsi tus pin peb txuas nrog rau#txhais TFT_GREY 0x5AEB // Tsis hais yam twg koj tab tom siv! #define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT22 // DHT 22 (AM2302) //#define DHTTYPE DHT21 // DHT 21 (AM2301) // Pib DHT sensor rau ib txwm 16mhz ArduinoDHT dht (DHTPIN, DHTTYPE); tsis muaj teeb tsa teeb tsa () {M5.begin (); M5. Lcd.setRotation (3); Serial.begin (9600); Serial.println ("DHTxx xeem!"); dht.begin ();} void loop () {// Tos ob peb feeb ntawm kev ntsuas. ncua (2000); M5. Lcd.fillScreen (TFT_GREY); // Nyeem qhov ntsuas kub lossis av noo siv li 250 milliseconds! // Sensor nyeem ntawv kuj tseem tuaj yeem ntev txog 2 vib nas this 'qub' (nws lub sensor qeeb heev) ntab h = dht.readHumidity (); // Nyeem kub li Celsius ntab t = dht.readTemperature (); // Nyeem kub li Fahrenheit ntab f = dht.readTemperature (tseeb); // Txheeb xyuas yog tias ib qho twg nyeem tsis tau zoo thiab tawm ntxov (sim dua). yog (isnan (h) || isnan (t) || isnan (f)) {Serial.println ("Ua tsis tau tejyam nyeem los ntawm DHT sensor!"); rov qab; } M5. Lcd.setCursor (0, 0, 2); M5. Lcd.setTextColor (TFT_WHITE, TFT_BLACK); M5. Lcd.setTextSize (1); // Ntsuas qhov ntsuas cua sov // Yuav tsum xa cov ntsuas hauv Fahrenheit! ntab hi = dht.computeHeatIndex (f, h); M5. Lcd.println (""); M5. Lcd.print ("Vaum:"); M5. Lcd.println (h); Serial.print ("Vaum:"); Serial.print (h); Serial.print (" %\ t"); M5. Lcd.setTextColor (TFT_YELLOW, TFT_BLACK); M5. Lcd.setTextFont (2); M5. Lcd.print ("Kub:"); M5. Lcd.println (t); Serial.print ("Kub:"); Serial.print (t); Serial.print (" *C"); Serial.print (f); Serial.print (" *F / t"); M5. Lcd.setTextColor (TFT_GREEN, TFT_BLACK); M5. Lcd.setTextFont (2); M5. Lcd.print ("ntsuas cua sov:"); M5. Lcd.println (nyob zoo); Serial.print ("Cov ntsuas cua sov:"); Serial.print (nyob zoo); Serial.println (" *F");}
Kauj Ruam 6: Tso Tawm
Tom qab xa cov cai koj tuaj yeem pom qhov ntsuas kub, av noo & ntsuas cua sov ntawm cov zaub raws li qhov tso tawm.
Pom zoo:
PyonAir - Qhib Qhov Chaw Huab Cua Huab Cua Pollution: 10 Cov Kauj Ruam (nrog Duab)
PyonAir - Qhib Qhov Chaw Huab Cua Pollution: PyonAir yog tus nqi qis rau kev saib xyuas cov pa phem hauv cheeb tsam - tshwj xeeb, muaj teeb meem me me. Raws li nyob ib puag ncig Pycom LoPy4 lub rooj tsavxwm thiab Grove-sib xws kho vajtse, lub kaw lus tuaj yeem xa cov ntaub ntawv hla LoRa thiab WiFi. Kuv lees paub qhov no
Huab Cua Huab Cua Huab Cua: 11 Kauj Ruam (nrog Duab)
Huab Cua Huab Cua Huab Cua: Txoj haujlwm no ua rau huab cua huab siv Raspberry Pi Zero W. Nws txuas rau Yahoo Huab Cua API thiab nyob ntawm qhov kev kwv yees rau hnub tom ntej hloov xim. Kuv tau tshoov siab los ntawm Wisconsin Gas Building uas muaj nplaim taws ntawm lub ru tsev uas hloov pauv
Qhov kawg Qhov Siab Tshaj Plaws Huab Cua Huab Cua Cov Ntaub Ntawv Logger: 9 Kauj Ruam (nrog Duab)
Qhov kawg High Altitude Weather Balloon Data Logger: Sau cov ntaub ntawv huab cua huab cua siab nrog qhov kawg qhov siab tshaj plaws huab cua zais zais cov ntaub ntawv logger. Lub zais pa huab cua siab, tseem hu ua lub zais pa siab lossis HAB, yog lub zais pa loj loj uas muaj cov helium. Cov balloons no yog lub platform
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
IoT Ua Yooj Yim: Txheeb Xyuas Cov Ntaub Ntawv Huab Cua Tej Zaum: UV thiab Huab Cua Kub & Vaum: 7 Kauj Ruam
IoT Ua Yooj Yim: Txheeb Xyuas Cov Ntaub Ntawv Huab Cua Nyob deb: UV thiab Huab Cua Kub & Vaum: Ntawm qhov kev qhia no, peb yuav ntes cov ntaub ntawv nyob deb li UV (Ultra-Violet hluav taws xob), huab cua kub thiab av noo. Cov ntaub ntawv no yuav yog ib qho tseem ceeb heev thiab yuav siv rau yav tom ntej Chaw Ua Haujlwm Huab Cua.Qhov thaiv daim duab qhia tau tias peb yuav tau txais dab tsi thaum kawg