Cov txheej txheem:

Nco Ntsoov: 4 Kauj Ruam
Nco Ntsoov: 4 Kauj Ruam

Video: Nco Ntsoov: 4 Kauj Ruam

Video: Nco Ntsoov: 4 Kauj Ruam
Video: Nco Ntsoov Kuv Mog - Qab Zib [ Nkauj Tawm Tshiab 7/6/2023 ] Official MV 2024, Hlis ntuj nqeg
Anonim
Nco Ntsoov
Nco Ntsoov

Qhov haujlwm Arduino no yog lub tshuab ceeb toom los pab cov uas tsis nco qab nqa lawv cov yuam sij tsis tu ncua.

Raws li ib txwm thaum koj tso koj cov yuam sij rau ntawm lub rooj, koj yuav hnov qab nqa nws. Yog li, txoj haujlwm no siv Ultrasonic sensor, zoo li thaum tus neeg siv tau ze dua xws li hnav lub khau ua ntej tawm mus, LED yuav ci thiab lub tshuab servo yuav cia tus yuam sij nyob rau saum nws txav mus, rub tus neeg siv saib xyuas xaj kom ceeb toom thiab tiv thaiv tus neeg siv kom nqa tus yuam sij.

Hauv cov lus qhia no, Kuv yuav muab cov lus qhia yuav ua li cas thiaj ua qhov "ceeb toom tseem ceeb" no. Cov ntaub ntawv xav tau, daim duab qhia kab hluav taws xob, cov lej tau muab rau hauv qab no.

Khoom siv

1. Arduino board (txhua yam ntawm Arduino board zoo)

2. Ib HC-SR04 Ultrasonic Sensor

3. Servomotor

4. Ib qho LED Dawb (Nws tsis tas yuav yog LED Dawb, tuaj yeem yog lwm yam xim)

5. Ib Green LED (Nws tsis tas yuav yog Green LED, tuaj yeem yog lwm yam xim)

6. Ob 220-ohm resistors

7. Plaub kauv kauv

8. Yim Txiv neej/Txiv neej txuas xov hlau

9. Ib lub khob cij

10. Ib lub thawv (xws li lub thawv ntim cov ntaub so ntswg)

11. Ib daim duab ntawv

12. Ib tug txiab

13. Kua nplaum

14. Koj tus yuam sij!

Kauj Ruam 1: Kauj Ruam 1: Txuas Cov Khoom Siv

Kauj Ruam 1: Txuas Cov Khoom Siv
Kauj Ruam 1: Txuas Cov Khoom Siv
Kauj Ruam 1: Txuas Cov Khoom Siv
Kauj Ruam 1: Txuas Cov Khoom Siv

Daim duab saum toj no qhia pom tias cov khoom siv thiab cov xov hlau txuas li cas. Koj tuaj yeem pom daim duab saum toj no raws li cov lus qhia los pab koj. Thiab hauv qab no, Kuv yuav piav qhia yuav ua li cas cov khoom sib txuas tau txuas nrog kom ntxaws.

Ua ntej, ntsaws lub ntsuas hluav taws xob ultrasonic rau hauv lub khob cij, siv cov xov hlau txuas VCC (koj tuaj yeem pom sab nraum qab ntawm lub ntsuas hluav taws xob ultrasonic) mus rau +5V tus pin, Trig (koj tuaj yeem pom nyob tom qab ntawm lub ntsuas ultrasonic) rau Arduino tus pin 12, Ncha mus rau Arduino tus pin 13, thiab GND rau GND. Qhov thib ob, txuas cov xov hlau ntawm servomotor mus rau tus pin ntawm lub khob cij thiab Arduino board. Cov xaim dub yog rau GND tus pin, cov xaim liab yog rau +5pin, cov xaim dawb yog tus pin 9. Thib peb, koj tuaj yeem siv cov khej kauv ua cov cuab yeej kom dav thiab tso LED mus rau lwm qhov. Cov dawb thiab ntsuab LEDs tau txuas nrog lub khob cij. Txawm li cas los xij, cov ceg luv txuas nrog GND tus pin thiab cov ceg ntev dua nrog txuas txuas 220-ohm resistors thiab dawb LED rau tus pin 3 thiab Green LED rau tus pin 2. Thaum kawg, txuas qhov zoo ntawm lub khob cij rau +5V tus pin thiab qhov tsis zoo rau GND.

Kauj Ruam 2: Kauj Ruam 2: Tsim Txheej Txheej

Kauj ruam 2: Tsim Txheej Txheej
Kauj ruam 2: Tsim Txheej Txheej
Kauj ruam 2: Tsim Txheej Txheej
Kauj ruam 2: Tsim Txheej Txheej
Kauj ruam 2: Tsim Txheej Txheej
Kauj ruam 2: Tsim Txheej Txheej

Txhawm rau ua txheej txheej sab nrauv, koj yuav xav tau ib lub thawv xws li lub npov cov ntaub so ntswg uas loj txaus kom haum koj li Arduino board. Ntawm no, Kuv tab tom siv lub thawv ntawv uas tau siv los tso lub qhov ncauj qhov ntswg. Tom qab ntawd, koj yuav tsum siv tus txiab txiav lub qhov nyob hauv qab sab laug ntawm lub thawv. Nov yog lub qhov rau Ultrasonic Sensor txhawm rau txheeb xyuas yog tias tus neeg siv nyob ze nws. Yog tias tus neeg siv nyob ntawm nws xub ntiag, tom qab ntawd servomotor thiab LED yuav txav mus thiab teeb pom kev. Tom qab ntawd, koj yuav tau txiav qhib lub qhov nyob rau saum toj ntawm lub thawv. Lub qhov no yog rau lub teeb LED dawb, pab ceeb toom rau tus neeg siv kom nqa tus yuam sij. Dhau li ntawd, koj yuav tsum khawb lwm lub qhov nyob hauv qab txoj cai ntawm lub thawv. Nov yog lub qhov rau lub teeb ntsuab ntsuab raws li nws yog lub teeb kom ceeb toom rau tus neeg siv tias lub tshuab tau qhib. Thaum kawg, koj yuav siv daim kab xev los lo cov ntsuas no, lub cev muaj zog, thiab LED txhawm rau kom ntseeg tau tias lawv nyob hauv tib qhov chaw. Tsis tas li, zoo li qhov kuv tau ua, Kuv tau hais qhia tias koj tuaj yeem siv daim ntawv qhwv zoo los qhwv ib puag ncig lub thawv kom ua rau nws zoo dua. Thaum kawg, txheej txheej sab nrauv tau tsim.

Kauj Ruam 3: Kauj Ruam 3: Txoj Cai

Kauj ruam 3: Code
Kauj ruam 3: Code
Kauj ruam 3: Code
Kauj ruam 3: Code

Koj theej cov duab kos rau koj Arduino thiab txaus siab rau koj "ceeb toom tseem ceeb"

Nov yog qhov txuas rau cov cai:

create.arduino.cc/editor/Victoria5868/7a3f…

Kauj Ruam 4: Tiav Khoom

Qhov no yog cov khoom tiav. Yog li, cov vis dis aus qhia tias koj tuaj yeem tso tus yuam sij saum lub servomotor. Tom qab ntawd, thaum koj hla lub tshuab ua ntej koj tawm hauv tsev. Lub tshuab servo yuav txav cov yuam sij kom ua rau koj mloog thiab LED yuav ci tuaj kom tau txais kev saib xyuas ntxiv. Qhov no yuav ua tiav tiv thaiv thiab ceeb toom tus neeg siv kom nqa cov yuam sij.

Txoj haujlwm no tseem tuaj yeem siv rau lwm yam khoom, yam uas koj yuav hnov qab nqa. Koj tuaj yeem sim nws thiab kuv zoo siab tos txais koj los qhia koj lub tswv yim hauv qab cov lus.

Pom zoo: