Cov txheej txheem:

Lo lus zais tiv thaiv qhov rooj Xauv ntawm Tnikercad: 4 Cov Kauj Ruam
Lo lus zais tiv thaiv qhov rooj Xauv ntawm Tnikercad: 4 Cov Kauj Ruam
Anonim
Lo lus zais tiv thaiv qhov rooj Xauv ntawm Tnikercad
Lo lus zais tiv thaiv qhov rooj Xauv ntawm Tnikercad

Txog qhov haujlwm no, peb yuav siv cov lus nkag los ntawm cov keyboard, txheej txheem uas tawm tswv yim raws li txoj haujlwm kaum, thiab txav lub tshuab servo raws li 3-tus lej uas tau txais.

Kuv siv 4 x 4 tus lej, tab sis yog tias koj muaj tus lej 3x4, nws muaj qhov sib txuas zoo sib xws, yog li nws tuaj yeem hloov kho tau yooj yim. Ib yam li ntawd, qee cov khoom siv Arduino tuaj nrog 4x4 laub-khawm matrix uas ua haujlwm zoo ib yam nkaus.

Kauj Ruam 1: Cheeb Tsam Koj Yuav Tsum Ua Rau Koj Txoj Haujlwm:

Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm
Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm
Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm
Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm
Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm
Cheeb Tsam Koj Yuav Tsum Ua Koj Txoj Haujlwm

Cov khoom koj yuav xav tau yog:

1. Arduino UNO lossis Nano

2. Keypad 4*4

3. Servo tsav

4. Led cov

5. Resistors (220 ohms)

Kauj ruam 2: Keypad 4*4 Pinout:

Keypad 4*4 Pinout
Keypad 4*4 Pinout
Keypad 4*4 Pinout
Keypad 4*4 Pinout
Keypad 4*4 Pinout
Keypad 4*4 Pinout

Keypad yog siv los ua cov cuab yeej siv los nyeem tus yuam sij nias los ntawm tus neeg siv thiab ua nws.

4x4 keypad muaj 4 kab thiab 4 kab. Hloov tau muab tso nruab nrab ntawm kab thiab kab. Ib qho xovxwm tseem ceeb tsim kev sib txuas ntawm kab thiab kab sib thooj, ntawm qhov hloov pauv tau muab tso rau. Yog xav paub ntau ntxiv txog cov keyboard thiab yuav siv nws li cas, xa cov ncauj lus 4x4 Keypad hauv cov ntsuas thiab ntu ntu.

Thov rub tawm lub keypad library zip file yog tias koj tab tom ua haujlwm ntawm Arduino IDE los ntawm qhov txuas hauv qab no:

github.com/Chris--A/Keypad

Kev sib txuas yog raws li hauv qab no:

R1 = 3

R2 = 4

R3 = 5

R4 = 6

C1 = 8

C2 = 9

C3 = 10

Nc4 = 11

Kauj Ruam 3: Txuas Servo Tsav Nrog Arduino:

Txuas nrog Servo Tsav Nrog Arduino
Txuas nrog Servo Tsav Nrog Arduino

Servo motors yog cov cuab yeej zoo uas tuaj yeem tig mus rau txoj haujlwm tshwj xeeb.

Feem ntau, lawv muaj servo caj npab uas tuaj yeem tig 180 degrees. Siv Arduino, peb tuaj yeem qhia tus servo mus rau txoj haujlwm tshwj xeeb thiab nws yuav mus rau ntawd. Yooj yim li ntawd! Servo motors tau siv thawj zaug hauv Kev Tswj Chaw Taws Teeb (RC) ntiaj teb, feem ntau yog los tswj lub kauj tsheb RC lossis cov flaps ntawm lub dav hlau RC. Nrog lub sijhawm, lawv pom lawv siv hauv cov neeg hlau, kev siv tshuab, thiab tau kawg, Arduino ntiaj teb.

Rub tawm lub tsev qiv ntawv servo los ntawm qhov txuas hauv qab no:

github.com/arduino-libraries/Servo

kev sib txuas ntawm servo motor:

1. Txiv kab ntxwv hlau piv txwv li tus pin teeb liab txuas nrog tus lej 7

2. Cov hlau liab txuas nrog 5v

3. Cov xaim dub txuas nrog hauv av

Kauj ruam 4: Code:

Txoj Cai
Txoj Cai

Txog kev qiv nyiaj, thov ua raws li kuv tus lej hauv qab no. Ua tsaug

Yog xav paub ntau cov phiaj xwm txuas nrog kuv ntawm:

Youtube:

Facebook nplooj ntawv:

Instagram: https://instagram.com/official_techeor? Igshid = uc8l10avryni

Pom zoo: