Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Yuav Ua Li Cas Txuas Cov Xov Tooj?
- Kauj Ruam 2: Kho ArduinoIDE
- Kauj Ruam 3: Sau Npe thiab Tsim Khoom, Node thiab Field
- Kauj ruam 4: Arduino Code
- Kauj ruam 5: Khiav thiab Tshawb xyuas
Video: DS18B20 Kub Sensor Box: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Yooj yim DS18B20 raws qhov ntsuas qhov ntsuas kub nrog qhib qhov 3D luam tawm lub thawv thiab cov qauv PCB.
Lub thawv thiab tus qauv PCB yog xaiv tau, tsuas yog ib qho ESP8266 raws MCU xav tau thiab ib qho DS18B20 ntsuas kub. Kuv qhia rau koj WEMOS D1 mini, tab sis qhov piv txwv no ua haujlwm nrog ESP-01 ib yam.
Qhov piv txwv no piav qhia yuav sau li cas thiab tso ib qho Arduino program mus rau ESP8266 MCU, yog li paub txog qhov txuj ci no ua ntej ua raws kuv.:)
Khoom siv
Yuav tsum muaj:- ESP8266 MCU- DS18B20- ib qho 4.7 kOhm resistor- ib co xaim
Xaiv tau:- WEMOS D1 mini li MCU- tus qauv PCB rau WEMOS D1 mini- 3D lub thawv luam ntawv
Kauj Ruam 1: Yuav Ua Li Cas Txuas Cov Xov Tooj?
Nws yog ib qho yooj yim li ncuav qab zib, txheeb xyuas cov kab hluav taws xob ntawm daim duab …:)
1, Yog tias tsis muaj lub rooj tsav xwm ESP8266, txuas RX thiab TX rau koj lub cuab yeej USB-txuas, thaum muaj ib lub rooj tsav xwm nrog USB sib xyaw ua ke qhov no tsis tsim nyog.
2, Txuas GND thiab VCC mus rau ESP8266 lub rooj tsavxwm thiab mus rau DS18B20 sensor.
3, Txuas tus tiv thaiv nruab nrab ntawm VCC thiab cov ntaub ntawv xov hlau ntawm DS18B20 sensor.
4, Txuas cov ntaub ntawv xov tooj ntawm DS18B20 sensor mus rau ib qho GPIO ntawm MCU (piv txwv li GPIO 2).
Kauj Ruam 2: Kho ArduinoIDE
Koj xav tau peb lub tsev qiv ntawv ntxiv:- OneWire: https://www.arduinolibraries.info/libraries/one-wire- DallasTemperature: https://www.arduinolibraries.info/libraries/dallas-temperature- IoT Guru Integration:
Kauj Ruam 3: Sau Npe thiab Tsim Khoom, Node thiab Field
IoT Guru huab yog huab dawb backend, koj tuaj yeem siv nws los cawm thiab qhia ntsuas qhov yooj yim heev.
Koj yuav tsum tsim lub cuab yeej, ntawm qhov chaw thiab thaj chaw:- Lub npe ntawm lub cuab yeej yog ESP8266: https://iotguru.cloud/tutorials/devices- Lub npe ntawm qhov yog DS18B20: https://iotguru.cloud/tutorials/ nodes- Lub npe teb yog qhov kub:
Txhawm rau txuas nrog huab, koj yuav tsum sib sau tsib tus cim:- userShortId: tus cim luv ntawm koj- deviceShortId: tus cim luv ntawm koj lub ntaus ntawv- ntaus ntawvKey: tus yuam sij zais ntawm koj lub ntaus ntawv-nodeShortId: tus cim luv ntawm koj lub ntaus ntawv- tebName: lub npe ntawm daim teb
Kauj ruam 4: Arduino Code
Nov yog tus lej piv txwv, koj yuav tsum hloov tus cim rau koj tus cim, hloov SSID thiab tus password rau koj li ntaub ntawv pov thawj WiFi thiab txheeb xyuas GPIO tus lej ntawm DS18B20 cov ntaub ntawv xov hlau.
#suav nrog
#include #include #include const char* ssid = "iotguru.cloud"; const char*password = "********"; String userShortId = "l4jLDUDDVKNNzx4wt2UR6Q"; Txoj hlua deviceShortId = "uAjbSzf8LvlrofvwYU8R6g"; Txoj hlua deviceKey = "hacfIjPn6KbBf2md8nxNeg"; IoTGuru iotGuru = IoTGuru (userShortId, deviceShortId, deviceKey); Txoj hlua nodeKey = "tGib1WSRvEGJ98rQYU8R6g"; String fieldName = "kub"; #define ONE_WIRE_BUS 2 OneWire oneWire (ONE_WIRE_BUS); DallasTemperature sensors (& oneWire); teeb tsa tsis muaj dab tsi (tsis muaj dab tsi) {Serial.begin (115200); ncua (10); WiFi.begin (ssid, password); thaum (WiFi.status ()! = WL_CONNECTED) {ncua (50); Serial.print ("."); } Serial.println (""); iotGuru.setCheckDuration (60000); iotGuru.setDebugPrinter (& Serial); sensors.begin (); } void loop (tsis muaj dab tsi) {iotGuru.check (); sensors.requestTemperatures (); ntab ntsuasValue = sensors.getTempCByIndex (0); Serial.println ("Thawj qhov ntsuas kub:" + Txoj hlua (ntsuas tus nqi) + "° C"); iotGuru.sendHttpValue (nodeKey, fieldName, ntsuas tus nqi); ncua (30000); }
Kauj ruam 5: Khiav thiab Tshawb xyuas
Yog tias txhua yam zoo, koj lub npov ntsuas cua yuav xa lub ntsuas ntsuas mus rau huab thiab koj yuav pom cov duab zoo li lub sijhawm yog tias kev ntsuas txaus tau sau tseg.
Cov piv txwv nyob: -
Txuas ntxiv qhov project GitHub:-
Pom zoo:
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: 53 Cov Kauj Ruam (nrog Duab)
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: Lub hom phiaj yog dab tsi? Ua kom yooj yim dua los ntawm kev ua kom sov koj lub tsev raws nraim qhov koj xav Ua kom txuag nyiaj thiab txo cov pa roj carbon tsev tso cua sov los ntawm cua sov koj lub tsev tsuas yog thaum koj xav tau Kev tswj hwm koj cov cua sov nyob txhua qhov chaw koj zoo siab koj tau ua nws y
Tutorial: Yuav Ua Li Cas Ua Kom Qhov Kub Kub Yooj Yim los ntawm Kev Siv DS18B20 thiab Arduino UNO: 3 Cov Kauj Ruam
Tutorial: Yuav Ua Li Cas Thiaj Li Kub Sensor los ntawm Kev Siv DS18B20 thiab Arduino UNO: Nqe lus piav qhia: Cov ntawv qhia no yuav qhia koj ob peb kauj ruam yooj yim ntawm yuav ua li cas thiaj ua kom lub ntsuas kub ua haujlwm. Nws tsuas yog siv ob peb feeb los ua qhov tseeb ntawm koj qhov project. Nyob zoo! Tus ntsuas kub DS18B20 digital muab 9-ntsis rau 12-ntsis Celsius txias
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
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