Cov txheej txheem:
- Kauj Ruam 1: Ntxiv Cov Tsev Kawm Ntawv Xav Tau rau Arduino IDE
- Kauj Ruam 2: Txhim Kho DS18B20
- Kauj Ruam 3: Thauj Cov Piv Txwv Piv Txwv "Ib Leeg"
- Kauj Ruam 4: Luam Tus Zauv Serial
- Kauj ruam 5: Tiav lawm
Video: Tau Txais Tus lej ntawm DS18B20 Nrog Arduino: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nov yog cov lus qhia nrawm yuav ua li cas kom tau txais tus lej ntawm koj tus DS18B20 1-xaim ntsuas kub.
Qhov no yooj yim rau cov haujlwm uas xav tau ntau lub ntsuas.
Yam koj xav tau:
- Arduino 5v (UNO, Mega, Pro Mini thiab lwm yam) - Arduino UNO R3 - AliExpress
- Temp Sensor DS18B20 - AliExpress - eBay
- 4.7k - 1/4w Resistor THT - AliExpress - eBay
- Breadboard - AliExpress - eBay
- Jumper Wires - Txiv neej rau Txiv neej - AliExpress - eBay
- Lub khoos phis tawj nrog Arduino IDE teeb tsa
Kauj Ruam 1: Ntxiv Cov Tsev Kawm Ntawv Xav Tau rau Arduino IDE
- Qhib Arduino IDE (Kuv siv 1.8.1)
- Nyem "Sketch" -> "Xws li Lub Tsev Qiv Ntawv" -> "Tswj Cov Tsev Qiv Ntawv …"
- Xaiv lub bar tshawb thiab ntaus "dallas"
- Nyem "DallasTemperature" thiab nyem "Install"
Xwb, koj tuaj yeem rub lub Tsev Qiv Ntawv los ntawm no:
Lub Tsev Qiv Ntawv no suav nrog OnWire Library.
Kauj Ruam 2: Txhim Kho DS18B20
Siv lub khob cij txuas nrog +5V, GND thiab Digital Pin 2 (Tus Pin 2 twb tau teeb tsa hauv qhov piv txwv piv txwv) los ntawm Arduino siv Txiv neej rau Txiv Neej breadboard jumpers.
Txuas DS18B20 txuas mus rau 3x daim kab xev dav dav ntawm lub khob cij.
- Pin 1 (GND) -> GND (Hauv av 0V)
- Pin 2 (DATA) -> Digital Pin 2
- Pin 3 (Vdd) -> +5V
Rau Lub Hwjchim Zoo Li Qub txuas 4.7K Resistor los ntawm +5V rau Digital Pin 2 xaim ntawm lub khob cij.
Cov txuas hauv qab no yog cov peev txheej zoo rau DS18B20 1-xaim ntsuas kub.
www.tweaking4all.com/hardware/arduino/ardu…
Kauj Ruam 3: Thauj Cov Piv Txwv Piv Txwv "Ib Leeg"
Thaum koj muaj nws txuas koj tau npaj thauj Dallas Kub "Ib Leeg" SketchOpen Arduino IDE (Kuv tab tom siv 1.8.1) Nyem "Cov Ntaub Ntawv" -> "Piv txwv" -> "Dallas Kub" -> "Ib Leeg" Kuv ntxiv qeeb (5000); ntawm kab 103 kom muab sijhawm rau kuv luam tus lej lej Xaiv koj daim ntawv tsim nyog "Cov cuab yeej" -> "Pawg Thawj Coj" Xaiv koj qhov chaw nres nkoj uas tsim nyog "Cov Cuab Yeej" -> "Chaw Nres Nkoj" Tam sim no "Upload" Daim Duab "Sketch" -> "Upload" Nyem "Tools" -> "Serial Monitor" xyuas kom tseeb tias baud tus nqi sib xws rau kuv yog 9600 Yog tias koj kos duab tsis tau upload xyuas koj li Board, Port, USB drivers thiab lwm yam.
Kauj Ruam 4: Luam Tus Zauv Serial
Los ntawm "Serial Monitor" koj yuav pom kab thib 4 yog "Device 0 Address: xxxxxxxxxxxxxxxx"
Nov yog Tus lej ntawm DS18B20
Yog tias nws yog "0000000000000000" ces muaj teeb meem nyeem koj li DS18B20.
Qhia nws nrog koj tus nas thiab nias CTRL+C ntawm koj cov keyboard tom qab ntawd nws hauv Notepad
Rau kuv lwm qhov haujlwm kuv cov cai siv ntau ntawm cov lej no. Kuv hloov kho HEX txoj hlua rau cov hom ntawv hauv qab no.
DeviceAddress tempSensorSerial [9] = {
{0x28, 0xFF, 0x07, 0xA6, 0x70, 0x17, 0x04, 0xB5}, {0x28, 0xFF, 0xB2, 0xA6, 0x70, 0x17, 0x04, 0x28}, {0x28, 0xFF, 0x42, 0x98, 0x70, 0x17, 0x04, 0xD3}, {0x28, 0xFF, 0x86, 0xA8, 0x70, 0x17, 0x04, 0xA6}, {0x28, 0xFF, 0x2B, 0x65, 0x71, 0x17, 0x04, 0x76}, {0x28, 0xFF, 0x66, 0x62, 0x71,, 0x17, 0x04, 0xF5}, {0x28, 0xFF, 0xD9, 0x9B, 0x70, 0x17, 0x04, 0x9C}, {0x28, 0xFF, 0x98, 0x6A, 0x71, 0x04, 0xED}, {0x28, 0xFF, 0x99, 0x42, 0x71, 0x17, 0x04, 0x4C}};
Kauj ruam 5: Tiav lawm
Tam sim no koj tuaj yeem txheeb xyuas txhua tus neeg DS18B20 1-xaim ntsuas kub hauv koj tus lej thiab siv ua haujlwm zoo li no:
ntab getTemperature (byte j) {
sensors.requestTemperaturesByAddress (tempSensorSerial [j]);
ntab tempC = sensors.getTempC (tempSensorSerial [j]);
rov qab tempC;
}
Pom zoo:
Micro: ntsis MU Vision Sensor rau Cov Pib Tshiab - Cov Ntawv Cim Tus Nqi thiab Tus lej Tus lej Cim: 6 Cov Kauj Ruam
Micro: me ntsis MU Kev Pom Kev Pom Zoo rau Cov Pib Tshiab - Cov Ntawv Cim Tus Nqi thiab Tus lej Cim Cim: Qhov no yog kuv phau ntawv qhia thib ob rau MU lub zeem muag pom kev. Hauv qhov haujlwm no peb yuav ua haujlwm micro: ntsis kom paub txog daim npav sib txawv los ntawm kev siv daim ntawv lo qhov tseem ceeb
ARUPI - Tus Nqi Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: 8 Kauj Ruam (nrog Duab)
ARUPI - Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: Cov lus qhia no tau sau los ntawm Anthony Turner. Txoj haujlwm tau tsim los nrog ntau qhov kev pab los ntawm Shed hauv Tsev Kawm Ntawv ntawm Kev Suav, University of Kent (Mr Daniel Knox tau pab zoo!)
BIQUAD Kav hlau txais xov Sab hauv, Ua los ntawm tooj liab thiab Ntoo rau Txais Txais HDTV Raws Hauv UHF Band (CHANNELS 14-51): 7 Cov Kauj Ruam
BIQUAD Kav hlau txais xov Sab hauv, Ua los ntawm tooj liab thiab Ntoo rau Txais Txais HDTV Raws Hauv UHF Band (CHANNELS 14-51): Hauv khw muaj ntau yam antennas rau TV. Cov neeg nyiam tshaj plaws raws li kuv tus qauv yog: UDA-YAGIS, Dipole, Dipole nrog cov duab ci, Thaj thiab Logarithmic antennas. Nyob ntawm qhov xwm txheej, qhov nrug deb ntawm kev kis tus kab mob
Tus lej lej nrog Arduino: 4 Kauj Ruam (nrog Duab)
Tus lej lej nrog Arduino: Nyob zoo cov phooj ywg, hnub no xav qhia qhov haujlwm no ib leeg. Nws yog hais txog tus lej ua si sib dhos nrog arduino, qhov kev ua si tau nthuav tawm ntawm Tv thiab tswj los ntawm cov keyboard ntawm (4x4) Saib cov vis dis aus ntawm no Rau kev zawv zawg lossis txav cov xwm txheej ntawm cov duab dhos ua si, nyem qhov tseem ceeb
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Info: 4 Cov Kauj Ruam
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws … Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Cov Lus Qhia: yog tias koj tau mus rau lub vev xaib thiab nws ua nkauj nkauj uas koj nyiam thiab xav tau nws ntawm no yog cov lus qhia rau koj tsis yog kuv qhov txhaum yog tias koj cuam tshuam qee yam (tsuas yog txoj hauv kev nws yuav tshwm sim yog tias koj pib tshem cov khoom yam tsis muaj laj thawj. ) Kuv tuaj yeem tau txais cov nkauj rau