Cov txheej txheem:

Bluetooth Enabled Joystick Controller: 9 Kauj Ruam (nrog Duab)
Bluetooth Enabled Joystick Controller: 9 Kauj Ruam (nrog Duab)

Video: Bluetooth Enabled Joystick Controller: 9 Kauj Ruam (nrog Duab)

Video: Bluetooth Enabled Joystick Controller: 9 Kauj Ruam (nrog Duab)
Video: Night 2024, Hlis ntuj nqeg
Anonim
Bluetooth Enabled Joystick Controller
Bluetooth Enabled Joystick Controller

Ua rau koj cov phooj ywg xav tsis thoob thiab txaus siab rau koj tsev neeg, thaum lawv tshawb xyuas "HypnoEllipse", sib tham sib A/V web app. Ua kom Bluetooth qhib lub joystick enclosure, txuas nws mus rau lub vev xaib, thiab hloov pauv ua tus kheej hypnosis.

Nov yog Bluetooth txuas nrog Joystick, uas xa HID (keyboard/nas) cov lus mus rau p5.js kos duab, uas nthuav tawm cov lus tsis pom kev tig thiab ua suab nrov piv.

Kauj Ruam 1: Cov Ntaub Ntawv Xav Tau

Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau

Cov cuab yeej

cam khwb cia hlau

laug

cov hlua hlau

laum

Drill ntsis 1/4"

qhov pom 3/4"

Qhov

Bluetooth qhib lub computer

Cov ntaub ntawv kaw

www.adafruit.com/product/905

Bluefruit EZ-Ntsiab

www.adafruit.com/product/1535

mini modular breadboard

www.sparkfun.com/products/12047

jumper cov xov hlau

www.sparkfun.com/products/8431

joystick

www.sparkfun.com/products/9182

USB micro-B breakout board

www.sparkfun.com/products/1833

5vdc rechargeable microUSB roj teeb

www.sparkfun.com/products/14167

SOFTWARE

Hypnoellipse lub web app

hypnoellipse.netlify.com/

Ua 1.5.1 (kom rov ua dua EZ Key)

processing.org/download/?processing

Tswj P5 (Ua lub tsev qiv ntawv)

www.sojamo.de/libraries/controlP5/

Firefoxhttps://www.mozilla.org/en-US/firefox/new/

Yog tias koj xav ua koj tus kheej version ntawm Hypnoellipse!

p5js ua

p5js.org/download/

Atom editor ua

atom.io/

Kauj Ruam 2: Npaj Joystick rau Bluefruit EZ Key Jumper Wires

Npaj Joystick rau Bluefruit EZ Key Jumper Wires
Npaj Joystick rau Bluefruit EZ Key Jumper Wires

Txiav thiab hle ib qho kawg ntawm txhua ntawm plaub khub ntawm cov xim sib txawv xim jumper xov.

Txhua tus khub xim sib xws rau qhov tshwj xeeb (Sab laug, Txoj Cai, Up, Down) joystick kev taw qhia - ib qho ntawm txhua khub mus rau EZ Key input, thiab lwm qhov rau GND.

Nrog rau lub siab no, ua tib zoo muab cov hlua jumper txuas rau joystick.

Kauj ruam 3: Prep Enclosure

Kev Npaj Ua Ntej
Kev Npaj Ua Ntej

Koj yuav xav tau ib qho 1/2 "qhov nyob ntawm ib sab ntawm lub thawv rau microUSB cable thiab plaub 1/4" qhov nyob rau sab saum toj rau npog lub joystick. Tus joystick nws tus kheej yuav xav tau 3/4 "qhov txiav.

Kuv siv ib daim ntawv thiab xaum ntawv txhawm rau taug cov qhov xav tau los ntawm lub rooj sib dhos joystick, ua ntej qhov kev khawb mus rau sab saum toj ntawm lub thawv yas.

Kauj Ruam 4: Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board

Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board
Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board
Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board
Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board
Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board
Nruab Joystick, Bluefruit EZ Key, thiab USB Breakout Board

Nco ntsoov txiav txim siab ua tib zoo li cas tus joystick plaub qhov xim tshwj xeeb cov hlua dhia txuas rau tus pin #0 - #4 ntawm EZ Key. Qhov no piav qhia li cas plaub lub microswitches ntawm tus joystick yuav hloov qhov txiaj ntsig ntawm mouseX thiab mouseY hauv p5.js kos duab.

Thaum koj txiav txim siab qhov kev taw qhia ntawm koj lub thawv ntim khoom, ua raws lub moos raws ib puag ncig ntawm txoj hlua txuas, txuas tus dhia mus rau qhov nkag ntawm EZ Key, thiab rov kho dua raws li qhov tsim nyog (sim thiab ua yuam kev!).

Cov pins hauv av los ntawm tus joystick tsim lub tsheb npav hauv av nrog rau tus pin hauv av ntawm Bluefruit EZ Key.

Hauv av thiab +5vdc los ntawm microUSB txuas tseem yuav txuas rau Bluefruit EZ Key.

Kauj Ruam 5: EZ Key GUI

EZ Key GUI
EZ Key GUI

Koj yuav tsum tau siv cov ntawv qub ntawm Kev Ua Haujlwm 2.2.1 los ua haujlwm GUI cov cuab yeej no.

Tus joystick nce/nqis/sab laug/sab xis txoj cai yuav ua raws li nas X thiab nas Y txav mus txhawm rau tswj p5.js kos duab (HypnoEllipse).

Phau ntawv qhia Adafruit no muab txhua yam ntaub ntawv tsim nyog los siv Bluefruit EZ-Key:

learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard

Kauj Ruam 6: Lub Hwj Chim thiab Pair Bluefruit EZ Key

Lub Hwj Chim thiab Pair Bluefruit EZ Key
Lub Hwj Chim thiab Pair Bluefruit EZ Key
Lub Hwj Chim thiab Pair Bluefruit EZ Key
Lub Hwj Chim thiab Pair Bluefruit EZ Key
Lub Hwj Chim thiab Pair Bluefruit EZ Key
Lub Hwj Chim thiab Pair Bluefruit EZ Key

Fais fab Bluefruit EZ-Key thiab nias khawm khawm.

Koj yuav tsum pom lub teeb liab liab LED. Tom ntej no nyem lub pob nyem me me ntawm EZ Key rau 5 vib nas this thiab tso tawm, qhov no yuav lwv cov ntaub ntawv ua khub yav dhau los thiab cia koj rov ua khub rau koj lub khoos phis tawj. Tam sim no LED liab yuav ntsais muag.

Qhib Bluetooth rau hauv System Preferences thiab nyem "Set Up New Device".

Cia tus pabcuam khiav mus txog thaum nws nrhiav thiab qhia EZ -Key module - xaiv nws thiab nyem "Txuas ntxiv".

Kauj Ruam 7: Tshem Tawm Cov Khawm ntawm Bluefruit EZ-Key

Tshem Tawm Cov Khawm ntawm Bluefruit EZ-Key
Tshem Tawm Cov Khawm ntawm Bluefruit EZ-Key

Hauv qhov screenshot sau tseg mouseX thiab mouseY qhov tseem ceeb cuam tshuam nrog tus lej tseem ceeb:

pib 0: x5

pin 1: x-5

pin 2: y 5

pin 3: y-5

Rub tawm ControlP5 LIbrary:

www.sojamo.de/libraries/controlP5/

Rub tawm cov ntawv zip nrog lub wireless remapper code:

learn.adafruit.com/system/assets/assets/000/013/042/original/GUI_EZKey_remapper_12-20-13.zip?1387568625

Uncompress thiab qhib GUI_EZKey_remapper.pde hauv Kev Ua.

Txheeb ob zaug tias Bluefruit tau ua khub rau koj lub khoos phis tawj.

Xaiv Sketch -> Khiav kom pib cov duab nraub qaum.

Tam sim no xaiv tus pin thiab siv cov ntawv qhia zaub mov xaiv cov nas qhia.

Tom ntej no nyem "SEND_MAP" xa nws mus rau koj li Bluefruit EZ-Key.

Cov ntawv tshaj tawm xov xwm hauv Txheej Txheem Txheej Txheem yuav tsum qhia tias nws tau pom Bluefruit thiab nws tau xa cov ntaub ntawv nrog Checksum Match.

Kauj Ruam 8: Tswj P5.js Sketch With Firefox Web Browser in Full Screen

Tswj P5.js Sketch Nrog Firefox Web Browser hauv Full Screen
Tswj P5.js Sketch Nrog Firefox Web Browser hauv Full Screen

Nov yog kuv p5.js kos duab tuav ntawm Netlify:

hypnoellipse.netlify.com

Koj tuaj yeem sim nrog koj tus nas, ua ntej tsim thiab txuas nrog lub joystick interface, kom pom thiab hnov qhov sib txawv ntawm lub suab.

Kauj Ruam 9: Kho, Kho, lossis Tsim Koj Tus Kheej Web App

Kho, Kho dua, lossis Tsim Koj Tus Kheej Web App
Kho, Kho dua, lossis Tsim Koj Tus Kheej Web App

Nov yog tus lej rau lub vev xaib app nws tus kheej:

github.com/dkonha01/HypnoEllipse

Koj tuaj yeem yooj yim txhim kho koj tus kheej cov ntawv, sim hloov pauv tus nqi hauv kab 44, 51, thiab 66 ntawm sketch.js - txheeb xyuas cov lus tawm kab rau cov piv txwv ntawm qhov no.

Pom zoo: