Cov txheej txheem:

Hloov Chaw Ua Si Qub Chaw Qub Joystick Rau Hauv Usb Flight Stick Nrog Arduino: 5 Kauj Ruam
Hloov Chaw Ua Si Qub Chaw Qub Joystick Rau Hauv Usb Flight Stick Nrog Arduino: 5 Kauj Ruam

Video: Hloov Chaw Ua Si Qub Chaw Qub Joystick Rau Hauv Usb Flight Stick Nrog Arduino: 5 Kauj Ruam

Video: Hloov Chaw Ua Si Qub Chaw Qub Joystick Rau Hauv Usb Flight Stick Nrog Arduino: 5 Kauj Ruam
Video: Qhia txog tug neeg caws2 yaum tes taw yuav ua li cas ? thiaj pab tau 2024, Kaum ib hlis
Anonim
Hloov Chaw Qub Chaw Ua Si Joystick Rau Hauv Usb Dav Hlau Ntaus Nrog Arduino
Hloov Chaw Qub Chaw Ua Si Joystick Rau Hauv Usb Dav Hlau Ntaus Nrog Arduino

Kev lees paub sai: Lub ntsiab lus ntawm qhov no yog qhov haujlwm tsis yog ua kom pheej yig game chaw nres nkoj joystick hloov dua siab tshiab. Lub ntsiab lus ntawm txoj haujlwm no yog txhawm rau ua kom muaj ntau yam thiab tuaj yeem tsim kho tus joystick uas tuaj yeem hloov pauv tau yooj yim. qhov laj thawj rau kuv xaiv Arduino tsuas yog vim tias kuv tau muaj qee lub sijhawm pub dawb ntawm tes thiab xav ua pa lub neej tshiab rau hauv kuv txiv ntxawm lub qub game chaw nres nkoj joystick. yog tias koj xav ua tib yam muaj ntau qhov hloov pauv pheej yig tawm ntawd thov koj sim lawv yog tias koj tsis xav ua yam nyuaj

Kauj Ruam 1: Sau Cov Khoom Uas Xav Tau:

Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau
Sau Cov Khoom Siv Yuav Tsum Tau

Yam uas koj xav tau yog:

  • qhov qub chaw nres nkoj game joystick (Kuv tau txais kuv li 2 $ los ntawm kev muag vaj)
  • txiv neej tus pin headers
  • ib Arduino uno (kwv yees li 18 $)
  • proto board lossis perfboard

Cov cuab yeej koj xav tau yog:

  • ib khub txiab
  • ib qho hlau txuas
  • qee cov hlau lead
  • lub khoos phis tawj nrog Arduino IDE thiab Atmel flip ntsia
  • internet kev twb kev txuas

Kauj Ruam 2: Tshem tawm Joystick:

Disassemble Joystick
Disassemble Joystick
Disassemble Joystick
Disassemble Joystick
Disassemble Joystick
Disassemble Joystick

thawj thiab qhov tseem ceeb tshaj plaws uas yuav tsum tau ua yog coj tus joystick sib nrug thiab xam cov xim coding ntawm cov xov hlau uas txuas rau cov nyees khawm.

Kauj Ruam 3: Ua Arduino Shield thiab Txuas Cov Xov:

Ua Arduino Shield thiab Txuas Cov Xov
Ua Arduino Shield thiab Txuas Cov Xov
Ua Arduino Shield thiab Txuas Cov Xov
Ua Arduino Shield thiab Txuas Cov Xov
Ua Arduino Shield thiab Txuas Cov Xov
Ua Arduino Shield thiab Txuas Cov Xov

Ua raws li schematic uas tau txuas nrog.

Yeej yog rau tus lej potentiometers sawv cev rau x thiab y axis ntawm joystick thiab cov laub khawm sawv cev rau qhov ua haujlwm

Kauj ruam 4: Kho lub Software:

Kho lub Software
Kho lub Software
Kho lub Software
Kho lub Software
Kho lub Software
Kho lub Software

Muaj ob peb kauj ruam los teeb tsa lub joystick no:

  • Ua ntej mus rau qhov txuas no https://github.com/AlanChatham/UnoJoy thiab rub tawm UnoJoy.
  • Tom ntej qhib Arduino IDE thiab nyem cov qauv coj mus rau pawg thawj coj saib.
  • tam sim no teeb tsa Atmel Flip thiab Java Runtime Environment
  • Tam sim no muab lub rooj tsavxwm rau hauv DFU hom los ntawm luv ob tus pin ze rau ntawm qhov chaw nres nkoj usb ntawm lub rooj tsavxwm lossis ua raws cov lus qhia hauv qhov txuas no
  • Tam sim no qhib Uno Joy nplaub tshev thiab taw rau Uno nplaub tshev thiab khiav cov ntawv Turnintoajoystick.bat
  • Tam sim no unplug thiab rov txuas rau Arduino board tam sim no txhua yam tau teeb tsa thiab npaj tau.
  • yog tias xav tau txheeb xyuas qhov kev xaiv usb tswj hwm hauv Windows txhawm rau txheeb xyuas tus tswj.

Kauj Ruam 5: Xaus Qhov Ua Tau thiab Teeb Meem:

Xaus Qhov Tseeb thiab Teeb Meem
Xaus Qhov Tseeb thiab Teeb Meem

Qhov no yog li cas tus joystick tig tawm.

thov txim uas tsis qhia qhov kawg ntawm kev ua haujlwm.

Yog tias koj muaj wiggling hauv lub joysticks txav thov txheeb xyuas 5v thiab gnd kev sib txuas uas mus rau lub zog ntsuas rau qhov teeb meem ntxiv tua thov hu rau kuv hauv ntu lus qhia thiab thov muab cov duab yog tias koj ua koj tus kheej

Pom zoo: