Cov txheej txheem:
- Kauj Ruam 1: Lub Sijhawm Saib Xyuas Lub Sijhawm No Yog Dab Tsi?
- Kauj Ruam 2: Yuav Ua Li Cas Pab Pawg Saib Xyuas Timer?
- Kauj Ruam 3: Khaws Koj Qhov Kev Pab Cuam
- Kauj Ruam 4: Piv Piv Txwv
- Kauj Ruam 5: Teeb Meem Timer
- Kauj ruam 6: Txaus siab rau
Video: Arduino Hang Guardian - Arduino Watchdog Timer Tutorial: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nyob Zoo Sawv Daws, Nws tshwm sim rau peb txhua tus. Koj tsim ib txoj haujlwm, zoo siab txuas txhua yam ntawm lub ntsuas, thiab tag li tam sim ntawd, Arduino dai thiab tsis muaj cov tswv yim ua tiav.
"Dab tsi tshwm sim?", Koj yuav nug thiab pib khawb los ntawm koj cov cai, tsuas yog kom paub tias koj tau daig hauv lub voj tsis kawg. Ua tsaug rau Vajtswv Arduino nyob ntawm koj lub rooj ntev zaum thiab tsis nyob hauv qhov chaw deb.
Niaj hnub no, peb yuav saib yuav ua li cas peb tuaj yeem siv lub sijhawm saib xyuas ntawm Arduino los tiv thaiv qhov no los ntawm qhov tshwm sim.
Kauj Ruam 1: Lub Sijhawm Saib Xyuas Lub Sijhawm No Yog Dab Tsi?
Arduino tus saib xyuas lub sijhawm raws li lub npe cuam tshuam yog lub sijhawm uas khiav sib cais los ntawm CPU tseem ceeb ntawm lub rooj tsavxwm. Lub sijhawm ntsuas no tuaj yeem siv los tshuaj xyuas lub xeev ntawm lub rooj saib xyuas ib ntus thiab hauv qhov xwm txheej uas pawg thawj coj tau raug kaw hauv lub software software lossis raug kaw vim tias kho vajtse tsis ua haujlwm, lub sijhawm saib xyuas tuaj yeem rov pib dua Arduino thiab kom nws rov pib dua.
Los ntawm lub neej ntawd thaum tsis siv lub sijhawm ua haujlwm no tau xiam rau txhua qhov haujlwm thiab tsuas yog thaum peb ua haujlwm rau nws, peb yuav tsum ua kom ntseeg tau tas li qhia nws kom tsis txhob rov pib dua peb lub rooj tsavxwm yog tias nws tseem ua haujlwm raws li qhov xav tau.
Yuav kom siv tau lub sijhawm saib xyuas, peb yuav tsum xub suav nrog avr/wdt.h cov ntaub ntawv hauv peb daim duab Arduino. Nov yog lub tsev qiv ntawv tus qauv uas tuav cov saib xyuas.
Kauj Ruam 2: Yuav Ua Li Cas Pab Pawg Saib Xyuas Timer?
Txhawm rau qhib lub sijhawm, peb siv lub luag haujlwm "wdt_enable" qhov twg peb xav tau kom dhau qhov pib ntawm lub sijhawm pib uas lub rooj tsavxwm yuav rov pib dua. Nyob ntawm peb cov ntaub ntawv siv, qhov no tuaj yeem nyob txhua qhov chaw los ntawm 15 milliseconds txog li 8 vib nas this hauv kev teeb tsa ua ntej uas muaj nyob hauv lub tsev saib xyuas lub tsev saib xyuas.
THRESHOLD - TUS KHEEJ NPE
15 ms WDTO_15MS 30 ms WDTO_30MS 60 ms WDTO_60MS 120 ms WDTO_120MS 250 ms WDTO_250MS 500 ms WDTO_500MS 1s WDTO_1S 2s WDTO_2S 4s WDTO_4S 8s WDTO_8S
Kauj Ruam 3: Khaws Koj Qhov Kev Pab Cuam
Tam sim no, nrog lub sijhawm ua haujlwm, txhawm rau tiv thaiv nws los ntawm kev rov pib dua peb Arduino peb yuav tsum tau hu ua ntu ntu "wdt_reset" ua haujlwm kom rov pib lub sijhawm saib xyuas ua ntej lub sijhawm pib pib tas sijhawm.
Thaum xaiv lub sijhawm pib dua, nws yog qhov tseem ceeb heev uas peb yuav tsum txiav txim siab txog kev ua haujlwm ntev npaum li nyeem ntawv lossis xa cov ntaub ntawv lossis txuas rau sab nraud. Qhov pib rov pib dua yuav tsum yog tsawg kawg ib thiab ib nrab npaug ntau dua li cov sijhawm no txhawm rau tiv thaiv kev rov ua yuam kev.
Kauj Ruam 4: Piv Piv Txwv
Hauv qhov piv txwv txoj haujlwm uas koj tuaj yeem rub tawm ntawm no, peb xub teeb tsa lub moos saib xyuas nrog lub sijhawm pib dua ntawm 4 vib nas this. Tom qab ntawd kom paub tias peb tab tom teeb tsa kev ua haujlwm, peb nyem LED rau 3 zaug sai thiab tom qab ntawd hauv lub voj tseem ceeb peb xub pib dua lub sijhawm, teeb lub teeb LED nrog ntu ntu ntev dua thiab tom qab ntawd peb tua nws. Lub voj tom ntej no teeb lub timer dua kom txog rau thaum lub teeb pom kev zoo ntev dua 4 vib nas this.
Thaum qhov no tshwm sim, tus saib xyuas lub sijhawm teem dua lub rooj tsavxwm thiab teeb tsa tau ua tiav dua.
Kauj Ruam 5: Teeb Meem Timer
Ib qhov teeb meem tuaj yeem nrog tus saib xyuas lub sijhawm, nyob ntawm qhov bootloader ntawm koj Arduino yog tias yog tus saib xyuas lub sijhawm ntsuas qis dhau thiab lub bootloader tsis rov pib lub sijhawm thaum rub tawm cov cai tshiab, koj tuaj yeem ua rau koj lub Rooj Tswjhwm Saib Arduino nyob rau hauv txoj kev uas nws yuav ib txwm nyob hauv theem pib. Lub bootloader yuav sim pib, tab sis lub sijhawm ua haujlwm yuav rov pib dua lub rooj tsavxwm, tsis txhob cia nws pib kom raug. Txhawm rau tiv thaiv cov teeb meem zoo li no, nco ntsoov siv lub sijhawm pib ntawm 2 vib nas this lossis ntau dua.
Kauj ruam 6: Txaus siab rau
Yog tias koj muaj qhov piv txwv ntawm qhov uas koj tau siv lub sijhawm saib lub moos hauv qhov haujlwm tiag, qhia rau kuv paub hauv cov lus, nco ntsoov nyiam cov vis dis aus thiab tsis txhob hnov qab sau npe.
Zoo siab thiab ua tsaug rau kev nyeem/saib!
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Cov av noo noo Cov Lus Qhia Tswj Xyuas Internet Txuas Cov Dej Dej (ESP32 thiab Blynk): 5 Cov Kauj Ruam
Cov av noo noo Cov lus pom zoo Tswj Xyuas Internet Txuas Cov Dej Dej (ESP32 thiab Blynk): Tsis txhawj xeeb txog koj lub vaj lossis nroj tsuag thaum koj mus rau hnub so ntev, lossis tsis nco qab ywg dej koj cov nroj tsuag txhua hnub. Zoo ntawm no yog kev daws teeb meem Nws cov av ya raws tswj hwm thiab thoob ntiaj teb txuas nrog cov dej txau dej tswj los ntawm ESP32 ntawm software pem hauv ntej kuv
Cov Ntawv Cim Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Cov Ntawv Cim - Cov Khoom Siv Soldering: 11 Kauj Ruam
Cov Khoom Siv Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Daim Npav - Cov Khoom Siv Soldering: Kab lus no tau txaus siab txhawb nqa los ntawm PCBWAY.PCBWAY ua cov qauv zoo PCBs rau tib neeg thoob plaws ntiaj teb. Sim nws rau koj tus kheej thiab tau txais 10 PCBs rau tsuas yog $ 5 ntawm PCBWAY nrog qhov ua tau zoo heev, Ua tsaug PCBWAY. Robadge#1 uas kuv tau tsim rau
Windows 7: Cov Ntsiab Lus Cov Ntawv Cov Khoom Tsis Muaj: 3 Cov Kauj Ruam
Windows 7: Cov Ntawv Qhia Cov Khoom Uas Tsis Muaj: Thaum twg los peb xaiv ntau dua 15 cov ntaub ntawv hauv Windows. qee yam khoom los ntawm cov ntawv qhia zaub mov ploj mus … Cov ntawv qhia no yuav qhia koj yuav ua li cas kom tau txais cov khoom ntawd rov qab los ntawm cov ntawv qhia zaub mov
NE555 Timer - Kev teeb tsa NE555 Timer hauv Kev Kho Kom Zoo: 7 Cov Kauj Ruam
NE555 Timer | Kev teeb tsa NE555 Timer hauv Kev Kho Kom Zoo: Lub sijhawm NE555 yog ib qho ntawm ICs feem ntau siv hauv ntiaj teb cov khoom siv hluav taws xob. Nws yog nyob rau hauv daim ntawv ntawm DIP 8, txhais tau tias nws muaj 8 tus pin