Cov txheej txheem:

Surprise Box: 4 Kauj Ruam
Surprise Box: 4 Kauj Ruam

Video: Surprise Box: 4 Kauj Ruam

Video: Surprise Box: 4 Kauj Ruam
Video: GARTEN OF BANBAN 3 MYSTERY BOX!? (SECRET TOYS INSIDE!) 2024, Kaum ib hlis
Anonim
Lub thawv Surprise
Lub thawv Surprise

Qhov haujlwm Arduino no tau muab los ntawm

Kuv tau ntxiv kuv tus kheej txuas ntxiv rau txoj haujlwm no.

Kauj Ruam 1: Kauj Ruam 1: Npaj Txhua Yam Khoom thiab Cov Cuab Yeej

Tsim lub thawv ntawv tsis txaus ntseeg no, koj xav tau cov ntaub ntawv qhia hauv qab no:

1. Arduino UNO R3

2. Ib HC-SR04 Ultrasonic Sensor

3. Servomotor

4. Ib qho LED dawb

5. Ib Leeg LED

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

11. Ib daim duab ntawv

12. Ib tug txiab

13. Kua nplaum

14. Qee cov khoom ua si me me rau kho kom zoo nkauj

Kauj Ruam 2: Kauj Ruam 2: Txuas Cov Khoom Siv

Kauj Ruam 2: Txuas Cov Khoom Siv
Kauj Ruam 2: Txuas Cov Khoom Siv

Txuas cov khoom siv thiab cov xov hlau raws li qhia hauv daim duab.

Ua ntej tshaj, ntsaws lub ntsuas hluav taws xob ultrasonic rau hauv lub khob cij, siv xov hlau txuas VCC (qhia nyob tom qab ntawm lub ntsuas hluav taws xob ultrasonic) mus rau +5V tus pin, Trig (qhia nyob tom qab ntawm lub ntsuas ultrasonic) rau Arduino tus pin 12. Echo rau Arduino tus pin 13, GND to TZS

Qhov thib ob, ntsaws cov xov hlau ntawm servomotor rau hauv tus pin ntawm lub khob cij. Cov xaim dub yog rau GND tus pin, xaim liab yog +5pin, xaim daj yog tus pin 9.

Thib peb, siv cov khej kauv txuas txuas cov xim dawb thiab daj rau LED rau ntawm lub khob cij. 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.

Plaub, txuas qhov zoo ntawm lub khob cij rau +5V tus pin thiab qhov tsis zoo rau GND.

Kauj Ruam 3: Kauj Ruam 3: Kho kom zoo nkauj

Kauj ruam 3: Kho kom zoo nkauj
Kauj ruam 3: Kho kom zoo nkauj
Kauj ruam 3: Kho kom zoo nkauj
Kauj ruam 3: Kho kom zoo nkauj

Ua ntej tshaj, tsim qauv thiab npaj yam koj xav kho kom zoo nkauj. Tom qab ntawd, txiav daim ntawv los rau hauv qhov me me haum thiab txiav ib lub qhov nyob ntawm ib sab ntawm lub thawv rau lub teeb LED daj thiab lwm lub qhov nyob ntawm lwm sab ntawm lub thawv rau xaim kom rub cov duab kos mus rau lub rooj tsavxwm.

Qhov thib ob, muab Arduino khob cij rau hauv lub thawv, tom qab ntawd muab lub teeb daj daj tso rau hauv lub qhov nyob ntawm ib sab ntawm lub npov.

Thib peb, muab thiab lo tag nrho cov khoom dai kom zoo nkauj rau ntawm daim duab los qhia, thiab txiav ib lub qhov ntawm daim duab los tso rau lub teeb ci LED dawb.

Thaum kawg, tso daim duab los rau hauv lub thawv, thiab muab tso rau saum Arduino lub khob cij.

Kauj Ruam 4: Kauj Ruam 4: Tshaj Tawm Sketch

Luam cov duab kos rau koj Arduino thiab txaus siab rau koj lub thawv xav tsis thoob

Cov cai:

Pom zoo: