Cov txheej txheem:

Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov: 4 Cov Kauj Ruam
Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov: 4 Cov Kauj Ruam

Video: Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov: 4 Cov Kauj Ruam

Video: Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov: 4 Cov Kauj Ruam
Video: Kev Tswj Hwm 7/12/2022 2024, Hlis ntuj nqeg
Anonim
Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov
Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov
Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov
Kev tswj hwm RC Servo Tsav Nrog Arduino thiab Ob Lub Sijhawm Hloov

Lub npe hais txhua yam. Kev tswj hwm lub tsheb RC servo motor nrog Arduino thiab qee qhov tiv thaiv, cov xov hluav taws xob, thiab ob txoj kev hloov pauv. Kuv ua qhov no hnub thib ob kuv tau txais kuv Arduino, yog li kuv zoo siab rau kuv tus kheej.

Kauj Ruam 1: Daim Ntawv Teev Npe

Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Okay, koj yuav xav tau cov hauv qab no: Arduino- $ 30-35 USD Nrhiav qhov twg yuav cov ntawd ntawm no. Jumper Wires- $ 8.50 USD Kuv tau txais kuv li los ntawm AmazonResistors- Pennies ib thooj Tau txais los ntawm Xov tooj cua Shack, Digi-Key, Mouser, Jameco, thiab lwm yam. Koj yuav tsum xav tau ob puag ncig 100 ohms (xim av dub xim av) thiab ob ncig 10k ohms (xim av txiv kab ntxwv daj). Cov no tsis tas yuav yog qhov tseeb. Servo Motor- $ 10 USD Yog, Kuv paub qhov no tsis yog qhov uas pheej yig tshaj hauv internet. Ntauwd HobbiesBreadboard- $ 9- $ 30 USD, Nyob ntawm qhov loj me. AmazonTactile Hloov- $ 0.20 USD Tsuas yog 6, 427 sab laug ntawm Digi-Key Kuv tsuas yog khaws kuv li …

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit

Lub voj voog yog yooj yim haum. Koj yuav tsum muaj peev xwm muab nws pov rau ntawm lub khob cij hauv tsib feeb zoo li kuv tau ua. Nco ntsoov tias nws tsis muaj kev nkag siab rau koj tsev neeg uas tsis tshua muaj siab hlub, thiab zoo li wad ntawm qee yam uas koj rub tawm ntawm tus nab. Yum.

Kauj Ruam 3: Txoj Haujlwm/Kos Duab

Qhov Program/Sketch
Qhov Program/Sketch

Nov yog kuv tus lej uas kuv tau siv. Kuv yuav piav qhia nws tom qab, Kuv zoo li tub nkeeg. Nov yog dab tsi thiab qhov no yog rau.

#suav nrog Servo myservo; int button7 = 0; int button6 = 0; int pos = 90; tsis muaj teeb tsa teeb tsa () {pinMode (7, INPUT); pinMode (6, INPUT); myservo.attach (9);} void loop () {button7 = digitalRead (7); khawm 6 = digitalRead (6); myservo.write (pos); ncua (5); pos = txwv (pos, 0, 180); yog (button7 == 1 && button6 == 0) {pos ++; } yog (button7 == 0 && button6 == 1) {pos--; }} Puas muaj kab, tsis pom? Kuv tsis pom ib qho…

Kauj ruam 4: Nws Ua Haujlwm (lossis Tsis Ua)! Thiab, Los sai sai …

Nws cia siab ua haujlwm rau koj, yog tias nws tsis tshaj tawm cov lus pom. Peb ntawm cov zej zog qhia tau zoo ib txwm pab tau tib neeg. Cia siab tias yuav ntxiv cov vis dis aus qee lub sijhawm sai sai. Tej zaum tsuas yog tshaj tawm cov vis dis aus ntawm Arduino tswj hwm kev pabcuam hauv lwm qhov haujlwm, txij li kuv tau txav mus rau qhov loj thiab zoo dua. Yog li muaj kev lom zem nrog qhov no, hloov kho nws, heck tawm mus thiab khwv tau nyiaj tawm ntawm nws thiab tom qab ntawd qhia kuv! Qhov ntawd tsuas yog ua rau kuv hnub.

Pom zoo: