Cov txheej txheem:

Yuav Ua Li Cas Tswj Joystick rau Arduino: 3 Kauj Ruam
Yuav Ua Li Cas Tswj Joystick rau Arduino: 3 Kauj Ruam

Video: Yuav Ua Li Cas Tswj Joystick rau Arduino: 3 Kauj Ruam

Video: Yuav Ua Li Cas Tswj Joystick rau Arduino: 3 Kauj Ruam
Video: Tagkis Yuav Zoo Li Cas - Cover Nyaj Xuv Xyooj (Hmoob) 2024, Hlis ntuj nqeg
Anonim
Yuav Ua Li Cas Tswj Joystick rau Arduino
Yuav Ua Li Cas Tswj Joystick rau Arduino
Yuav Ua Li Cas Tswj Joystick rau Arduino
Yuav Ua Li Cas Tswj Joystick rau Arduino

Hauv cov lus qhia no, kuv yuav qhia koj yuav ua li cas ua lego joysticks rau arduino.

Khoom siv

pawg legos

Kev xav

qee lub sij hawm

ob tug joysticks

jumper cov kab

arduino ib

usb hom B

Kauj Ruam 1: Ua Lub Cev

Ua Lub Cev
Ua Lub Cev
Ua Lub Cev
Ua Lub Cev

Kuv yuav tsis qhia koj daim ntawv qhia meej kom ua qhov no, tab sis thawj zaug koj yuav tsum nyob ib puag ncig PCB nrog lego. ua ntej pom qee yam duab plaub thiab ntau dua li thaiv dav dua li joystick. tom qab ntawd, koj tuaj yeem siv 1*1 thaiv nrog cov 1*2 cov nplais kom tuav tus joystick nqes. Lossis, koj tuaj yeem siv cov pas ntev nrog qhov nyob hauv nws thiab lo cov pob zeb xiav nrog ib sab luv, zoo li hauv daim duab, tuav lub joystick nqis. tom qab ntawd, ua tib yam nrog lwm tus joystick, thiab tom qab ntawd txuas lawv. tom qab ntawd sau qhov nruab nrab ntawm qhov chaw khoob kom nws ruaj khov, thiab zoo los tuav nws. Tam sim no nws yog lub sijhawm los kho nws. koj tuaj yeem ntxiv qee tus tes lossis lo rau qee daim dai kom zoo nkauj … ua qhov koj xav tau.

Kauj ruam 2: Txuas

Txuas
Txuas
Txuas
Txuas

siv jumper cables txuas txuas arduino rau joystick. ntsaws rau hauv mf jumper cables, thiab nrhiav seb cov xim twg yog tus pin. thiab txuas gnd-gnd, vcc-5v, sx-analog1, sy-analog2, sk-digital2.

Kauj Ruam 3: Ua Kev Ua Si

tam sim no ua tej yam koj xav tau nrog qhov no! tab sis ceev faj, vim tias cov joysticks pheej yig muaj suab nrov thiab nws qhov hluav taws xob yuav tsum nyob ntawm 112 (max 255), tab sis nws nce thiab nqis, yog li ceev faj. Kuv tau ua qhov kev ua si me me uas tuaj yeem ua si 2-player, tab sis kuv tsis paub yuav xa cov ntaub ntawv zip li cas. lawv hais tias hom ntawv tsis raug tso cai.

Pom zoo: