Cov txheej txheem:
- Kauj ruam 1: Saib Video
- Kauj ruam 2: Cov ntaub ntawv
- Kauj Ruam 3: Txuas Ultrasonic Module
- Kauj ruam 4: Kev thaiv kab
- Kauj ruam 5: Code
Video: Arduino Tswb Nrog Ultrasonic Sensor: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Cov lus qhia no yog hais txog yuav ua li cas thiaj yooj yim thiab pheej yig lub tswb nrov ntawm koj tus kheej.
Yog tias koj muaj lus nug lossis teeb meem koj tuaj yeem tiv tauj kuv ntawm kuv tus email: [email protected]
Nov kuj yog video ntawm qhov haujlwm no:
www.youtube.com/embed/A_Px-gb8hYY
Yog li cia pib.
Kauj ruam 1: Saib Video
Koj tseem tuaj yeem pom hauv video tias txoj haujlwm no ua haujlwm li cas.
www.youtube.com/watch?v=A_Px-gb8hYY
Kauj ruam 2: Cov ntaub ntawv
Txhua yam ntaub ntawv koj xav tau rau txoj haujlwm no koj tau txais ntawm UTSource.
Sponsor Link: UTSource.netReviews
Nws yog lub vev xaib ntseeg tau rau kev xaj cov khoom siv hluav taws xob nrog pheej yig
tus nqi thiab zoo heev
-Arduino Mega lossis Uno
-Ultrasonic sensor HC-SR04
-2 laub khawm
-Arduino relay modul
-3 LEDs (ntsuab, liab, xiav) Yog tias koj xav tau koj tuaj yeem xaiv lwm yam xim
-some resistors (10k ohm)
-zoo
-jumper xov hlau
-daim ntawv qhia
Kauj Ruam 3: Txuas Ultrasonic Module
Txog qhov haujlwm no kuv tau siv ultrasonic module HC-SR04 vim tias nws pheej yig thiab nws yooj yim los ua haujlwm nrog. Kuv yuav hauv internet rau 3 $.
Yog li ntawm qhov ntsuas no koj muaj 4 tus pin.
1.pin Vcc - tus pin no txuas nrog 5V+.
2. pin. Trig - koj yuav tsum txhais tus pin no hauv koj qhov program.
3.pin Echo -this tus pin zoo ib yam li Trig koj kuj yuav tsum tau txhais nws.
4.pin GND - tus pin no txuas nrog hauv av.
Yuav ua li cas txhais tus pin
Hauv qhov no koj yuav tsum txhais cov pins rau Trig thiab Echo. I tau txhais cov lej digital 7 rau trigPin thiab tus lej digital 8 rau echoPin.
Yog tias koj xav tau koj tuaj yeem xaiv lwm tus lej digital ntawm 2 txog 53.. (tshwj tsis yog 0 thiab 1)
Koj yuav tsum sau cov cai no ua ntej tsis muaj teeb tsa (). (Saib cov kauj ruam Code)
#define trigPin 7
#define echoPin 8
Kauj ruam 4: Kev thaiv kab
Thaum koj tab tom txuas lub khawm koj yuav tsum txuas tus tiv thaiv (Kuv siv 10k ohm resistors) nruab nrab ntawm GND thiab thawb lub pob kom txhawm rau ua kom muaj txiaj ntsig 0 ntawm lub khawm.
Pushbutton (ON) txuas nrog tus lej digital 10
Pushbutton (OFF) txuas nrog tus lej digital 6
Buzzer txuas nrog tus lej digital 3
Liab LED txuas nrog tus lej digital 4
Xiav LED txuas nrog tus lej lej 5
Ntsuab LED txuas nrog digita tus pin 11
Kev xa xov txuas nrog tus lej digital 11
Hlau rau buzzer yog thawj zaug txuas nrog rau kev xa xov module thiab tom qab ntawd los ntawm relay mus rau buzzer. Kuv siv NC sib cuag ntawm kev xa xov
Kauj ruam 5: Code
Nov yog chaws rau tswb.
Tsuas yog rub nws, ntsaws rau hauv Arduino thiab xa cov lej.
Pom zoo:
Tswb Tswb Tswb Tswb Tswb: 3 Kauj Ruam
Lub Tswb Tswb Tswb Tswb: Kuv yog menyuam kawm ntawv 13 xyoos hauv Taiwan.Kuv ua yam nrog Arduino thawj zaug yog tias koj tuaj yeem qhia kuv yuav ua li cas txhim kho txoj haujlwm no, thov tawm lus rau kuv kom kuv tuaj yeem ua qhov zoo dua. (Ua tsaug ) Lub moos no tuaj yeem tsa koj thaum koj tsaug zog, tab sis kuv
Tswb Tswb Tswb Tswb Tswb Ntse Teeb: 8 Kauj Ruam (nrog Duab)
Tswb Tswb Tswb Tswb Tswb Lub Teeb: Hauv qhov haujlwm no kuv tau siv lub tshuab cua-tsoo lub tswb tawg tag. Lub ntsej muag ntawm lub moos tau hloov pauv los ntawm 12 LEDs, teeb pom kev los ntawm LED kab ib ncig ntawm ntug ntawm lub moos. 12 LEDs qhia lub sijhawm thiab cov hlua LED tau teeb tsa los ua lub tswb, tig
Arduino Push Alerts rau Lub Tswb, Tswb Tswb, Tswb Tswb Tswb Thiab Lwm Yam: 8 Kauj Ruam
Arduino Push Alerts rau Tswb, Tswb Tswb, Tswb Tswb Tswb thiab lwm yam: IoT Cov Ntawv Ceeb Toom los ntawm koj lub Tswb, Tswb Tswb, Tswb Tswb thiab lwm yam siv Arduino Uno thiab Ethernet Shield. Cov ncauj lus kom ntxaws ntawm kuv lub vev xaib ntawm no Hais txog Arduino Push Alert Box Siv Arduino Uno thiab Ethernet Shield raws li Wiznet W5100 nti rau
Tswb Tswb Tswb Tswb Nrog Arduino: 9 Kauj Ruam (nrog Duab)
Tswb Tswb Tswb Tswb Nrog Arduino: Lub caij ntuj no tuaj yeem tu siab. Koj sawv, nws tsaus ntuj thiab koj yuav tsum tau tawm ntawm txaj. Qhov kawg uas koj xav hnov yog lub suab nrov nrov ntawm koj lub tswb tswb. Kuv nyob hauv London thiab kuv muaj lub sijhawm nyuaj thaum sawv ntxov. Tsis tas li ntawd, kuv nco tsis tau txog rau
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa: 7 Kauj Ruam (nrog Duab)
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa Tswm Tswm: Tsa Kuv Lub Caij Ntuj No Lub caij ntuj no kuv tus hluas nkauj muaj teeb meem sawv thaum sawv ntxov thiab zoo li raug kev txom nyem los ntawm SAD (Lub Caij Caij Nyoog Muaj Teeb Meem). Kuv txawm pom tias nyuaj npaum li cas kom sawv thaum lub caij ntuj no vim lub hnub tsis tuaj