Cov txheej txheem:
- Kauj Ruam 1: Txuas MPU6050 thiab Thawb Lub Pob rau Arduino Leonardo Board
- Kauj Ruam 2: Tsim Lub Joystick Base
- Kauj Ruam 3: Teeb Arduino IDE
- Kauj ruam 4: Arduino Program
- Kauj Ruam 5: Xeem Tawm Joystick
Video: DIY MPU-6050 USB Joystick: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Nrog Microsoft Davhlau Simulator 2020, Kuv pom sai sai tias nws nyuaj npaum li cas los siv cov keyboard los ya lub phiaj xwm. Tshawb nrhiav hauv online, Kuv tsis tuaj yeem pom tus nqi tsim nyog joystick los yuav. Feem ntau cov khw muag khoom online tau ua rau lawv tsis muaj khoom. Lub koob npe nrov ntawm MS Dav Hlau Simulator thiab COVID 19 kev kis thoob qhov txhia chaw tau tshem tawm tag nrho cov khoom siv joystick uas twb muaj lawm. Kuv qhov kev xaiv tsuas yog tsim kuv tus kheej.
Feem ntau ntawm cov joysticks tawm muaj siv lub zog ntsuas ntawm lub hauv paus los txiav txim cov ces kaum ntawm tus joystick thiab xa cov ntaub ntawv x thiab y rov qab mus rau lub computer. Qhov no ua haujlwm tau zoo tab sis ua rau nyuaj rau kev tsim cov joystick. thiab dhau sijhawm. cov potentiometers yuav hnav tawm. Hloov chaw ntawm kev siv potentiometers, kuv txiav txim siab mus nrog lub ntsuas kev ntsuas/lub ntsuas hluav taws xob ntsuas lub ntsej muag kom xa cov ntaub ntawv mus rau lub khoos phis tawj ntawm cov ces kaum ntawm tus pas.
Nrog rau kev nyiam ntawm ntau yam Arduino microprocessors thiab ntau yam ntsuas, tus nqi ntawm kev tsim ib qhov haujlwm Arduino ua tau ntau dua. Ib qho ntawm feem siv accelerometer/gyroscope sensor board yog MPU-6050. Hauv tebchaws Canada, nws raug nqi ib ncig $ 7 CAN hauv Amazon. Kuv tau txais kuv li los ntawm eBay xa los ntawm Tuam Tshoj rau tsawg dua, tab sis lub sijhawm thauj khoom zoo li 3 lub hlis lossis ntev dua.
www.amazon.ca/Neuftech-MPU-6050-3-Gyroscop…
Ib qho Arduino pawg thawj coj yuav ua haujlwm, tab sis siv ATmega32u4 raws lub rooj tsavxwm yuav yooj yim dua, vim tias ATmega32u4 muaj haiv neeg HID (Tib Neeg Sib Txuas Ntaus) txhawb nqa. Thaum pawg thawj coj tau teeb tsa, koj tuaj yeem siv nws ntawm ib qho Windows 10 PC thiab tsis xav tau software ntxiv. Windows 10 yuav lees paub nws ua tus joystick thaum lub USB txuas. (Siv lwm hom Arduino pawg thawj coj yog qhov nyuaj rau txoj haujlwm tsim yooj yim no).
Kuv xaiv Arduino Leonardo board. $ 17 CAN los ntawm Amazon.
www.amazon.ca/KEYESTUDIO-Leonardo-Developm…
Cov cuab yeej 2 no yog qhov xav tau tseem ceeb rau txoj haujlwm no. Lwm yam khoom me me xws li wirings thiab laub khawm yog qhov tsim nyog ib yam. Hauv txoj haujlwm no, kuv tsuas yog siv 2 lub pob nyem kom yooj yim.
Lub joystick kov yog tsim los ntawm seem PVC cov yeeb nkab dej. Qhov no tuaj yeem hloov pauv tau yooj yim nrog cov yeeb nkab txhav luv.
Lub hauv paus ntawm tus joystick yog lub qhov rooj caij nplooj ntoo hlav nres ntawm ib daim ntoo.
Lub qhov rooj nres lub caij nplooj ntoo hlav muaj nyob hauv Tsev Depot rau $ 2.83CAN.
www.homedepot.ca/product/everbilt-spring-d…
Kauj Ruam 1: Txuas MPU6050 thiab Thawb Lub Pob rau Arduino Leonardo Board
Tsuas yog 4 qhov kev sib txuas tau siv ntawm MPU 6050. Lawv tau sau lo lus VCC, GND, SCL thiab SDA.
Txuas VCC mus rau 5v lossis 3.3v ntawm Arduino Leonardo. (MPU 6050 tuaj yeem siv 5v lossis 3.3v. Tsis muaj teeb meem)
Txuas GND rau ib qho GND ntawm Arduino Leonardo.
Txuas SCL rau SCL ntawm Arduino Leonardo.
Txuas SDA rau SDA ntawm Arduino Leonardo.
Kuv tsuas yog siv 2 lub pob nyem rau lub hom phiaj ua qauv qhia no.
Thawj lub laub khawm tau siv los pib dua lub joystick chaw Hauv qhov piv txwv no, ib kawg ntawm lub laub khawm txuas nrog GND thiab ib kawg rau PIN 13.
Lub laub thib ob yog siv los ua lub khawm joystick. Hauv qhov piv txwv no, nws txuas nrog PIN 9 thiab GND.
Koj tuaj yeem ntxiv cov nyees khawm ntxiv raws li xav tau hauv koj qhov haujlwm.
Kauj Ruam 2: Tsim Lub Joystick Base
Nrhiav ib daim ntoo thaiv. Qhov hnyav dua zoo dua. Nws yuav ua rau lub hauv paus joystick ruaj khov dua.
Ntsia lub qhov rooj rau lub caij nplooj ntoo hlav rau ntawm qhov nruab nrab ntawm cov ntoo thaiv raws li qhia hauv daim duab.
Siv ib daim yeeb nkab luv luv raws li tus joystick tuav. Kuv tau siv lub tshuab raj PVC. Teem lub xaim kom lub ntsuas hluav taws xob/ntsuas lub ntsuas hluav taws xob tau zaum saum lub raj.
Tom qab ntawd muab cov yeeb nkab hla lub qhov rooj nres lub caij nplooj ntoo hlav. Kuv siv daim kab xev hluav taws xob txhawm rau kaw lub sensor rau saum.
Kauj Ruam 3: Teeb Arduino IDE
Rub tawm thiab teeb tsa Arduino IDE.https://www.arduino.cc/en/Main/Software
Kuv siv Arduino 1.8.13 rau qhov haujlwm no. Arduino Web Editor tuaj yeem siv rau txoj haujlwm no ib yam.
2 lub tsev qiv ntawv tau siv.
1. MPU6050_tockn los ntawm tockn
github.com/Tockn/MPU6050_tockn
lossis koj tuaj yeem pom nws hauv "Manage Library" menu.
2. Lub tsev qiv ntawv Joystick los ntawm Matthew Heironimus
github.com/MHeironimus/ArduinoJoystickLibr…
Qhov no tam sim no tsuas yog muaj los ntawm GitHub lub vev xaib.
Nyem rau download Code thiab rub tawm ZIP. Luam tawm ZIP cov ntaub ntawv rau koj phau ntawv teev npe Arduino.
Hauv kuv qhov xwm txheej, nws yog E: / PinChung / Documents / Arduino / libraries
Kauj ruam 4: Arduino Program
Load Pin_Joystick.ino mus rau Arduino IDE thiab muab tso ua ke thiab xa mus rau Leonardo pawg thawj coj.
Nco ntsoov Arduino Leonardo pawg thawj coj tau xaiv thiab tus lej chaw nres nkoj tau xaiv rau sab xis COM: hauv qab Cov cuab yeej ntawv qhia zaub mov.
Kuv pom qee lub sijhawm, qhov program tsis tuaj yeem rub tawm nrog qhov yuam kev ntawm COM chaw nres nkoj tsis muaj. Thawb lub pob pib dua ntawm Leonardo pawg thawj coj ob peb zaug thaum suav sau yuav pab tau. Kuj rov pib dua Windows 10 kuj tseem tuaj yeem pab dawb ntawm qhov chaw nres nkoj COM.
Thaum qhov kev zov me nyuam raug xa mus rau Leonardo pawg thawj coj, Windows 10 yuav tsum txiav txim siab pom Leonardo Joystick. Hauv Windows 10 tshawb nrhiav bar, ntaus Game Controllers, khiav Teeb USB Game Controllers.
xaiv Leonardo Joystick thiab nyem Properties. Lub joystick txav thiab lub joystick #1 khawm yuav tsum tau khaws los ntawm Windows 10.
Yog hais tias tus joystick tsis nyob hauv nruab nrab, thaum koj tso nws mus, nyem rau ntawm qhov pib dua joystick center khawm peb nyuam qhuav ua. USB Game Controllers yuav tsum qhia lub joystick teev nyob hauv nruab nrab. Tsis tas yuav xav tau ntsuas lub joystick hauv USB Game Controller program..
Nco Ntsoov Sab: Rau cov uas tsis paub nrog Arduino Leonardo, thaum lub cuab yeej tau teeb tsa ua tus joystick, nas lossis keyboard, qhov chaw nres nkoj txuas yuav tsis ua haujlwm. Yog li "Serial.print ()" yuav tsis ua haujlwm. Tsis tas li, MPU6050 siv i2c xaim tsev qiv ntawv thiab siv SDA thiab SLC pins. Ntawm Leonardo, SDA thiab SCL nqa ob tus PIN 2 thiab PIN 3, yog li tsis txhob siv 2 tus pin no rau lwm yam.
Kauj Ruam 5: Xeem Tawm Joystick
Kuv sim nws tawm ntawm Microsoft Davhlau Simulator 2020 thiab nws ua haujlwm tau zoo heev. Kuv yuav tsum tau nyem qhov tseem ceeb nruab nrab qee zaum rau xoom joystick. MPU6050 tus nqi ntsuas yuav ploj mus me ntsis lub sijhawm.
Muaj ntau txoj hauv kev los siv rau hauv txoj haujlwm, xws li ntxiv cov nyees khawm ntxiv thiab ntxiv cov tswj lub qhov rooj. Vam tias qhov no yuav txhawb lwm tus tinkers los tshawb nrhiav txoj hauv kev tshiab hauv kev tsim khoom.
Pom zoo:
Motion Tracking Siv MPU-6000 thiab Particle Photon: 4 Cov Kauj Ruam
Motion Tracking Siv MPU-6000 thiab Particle Photon: MPU-6000 yog 6-Axis Motion Tracking Sensor uas muaj 3-Axis accelerometer thiab 3-Axis gyroscope embedded hauv nws. Qhov ntsuas no muaj peev xwm taug qab qhov tseeb ntawm qhov chaw thiab qhov chaw ntawm ib yam khoom hauv lub dav hlau 3-dimensional. Nws tuaj yeem ua haujlwm hauv
Motion Tracking Siv MPU-6000 thiab Arduino Nano: 4 Cov Kauj Ruam
Motion Tracking Siv MPU-6000 thiab Arduino Nano: MPU-6000 yog 6-Axis Motion Tracking Sensor uas muaj 3-Axis accelerometer thiab 3-Axis gyroscope embedded hauv nws. Qhov ntsuas no muaj peev xwm taug qab qhov tseeb ntawm qhov chaw thiab qhov chaw ntawm ib yam khoom hauv lub dav hlau 3-dimensional. Nws tuaj yeem ua haujlwm hauv
Me USB USB Joystick: 5 Kauj Ruam (nrog Duab)
Me Me USB Joystick: Qhov kev xav tau no qhia yuav ua li cas yooj yim heev me me USB joystick. Cov lus qhia no cuam tshuam nrog Hall Effect USB Joystick rau muab kev daws teeb meem qis
Motion Tracking Siv MPU-6000 thiab Raspberry Pi: 4 Cov Kauj Ruam
Motion Tracking Siv MPU-6000 thiab Raspberry Pi: MPU-6000 yog 6-Axis Motion Tracking Sensor uas muaj 3-Axis accelerometer thiab 3-Axis gyroscope embedded hauv nws. Qhov ntsuas no muaj peev xwm taug qab qhov tseeb ntawm qhov chaw thiab qhov chaw ntawm ib yam khoom hauv lub dav hlau 3-dimensional. Nws tuaj yeem ua haujlwm hauv
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas