Cov txheej txheem:

Minecraft Gesture Controller: 10 Kauj Ruam (nrog Duab)
Minecraft Gesture Controller: 10 Kauj Ruam (nrog Duab)

Video: Minecraft Gesture Controller: 10 Kauj Ruam (nrog Duab)

Video: Minecraft Gesture Controller: 10 Kauj Ruam (nrog Duab)
Video: Night 2024, Hlis ntuj nqeg
Anonim
Image
Image
Cov Khoom & Cov Cuab Yeej!
Cov Khoom & Cov Cuab Yeej!

Tsiv koj lub cev mus ua si Minecraft! Dab tsi !! Yog lawm Saib daim vis dis aus rau qhov demo:)

Phau ntawv qhia no yuav qhia koj yuav ua li cas thiaj ua rau koj tus kheej lub tes taw game game tswj rau Minecraft (lossis lwm yam koj nyiam. Computer game). Tsiv koj txhais tes mus taug kev/khiav/dhia, saib ib puag ncig, thiab tua* txhua yam!

Cia peb pib! Coj koj tus kheej mus rau Circuit Chaw Ua Si Qhia, snag kuv qhov program program, thiab ua kom zoo li ua si Minecraft hauv (srsly) txoj kev lom zem tshaj plaws!: D

Lub sijhawm nyeem ntawv: 20 min

Lub Sijhawm Tsim: ~ 2 teev

Nqi: ~ $ 30

*Nws yog biiiiit ua kom yuam kev txav cov khoom (zoo li dab), yog li ceev faj hauv hom kev muaj sia nyob! Lossis siv qhov no los tawm tsam koj cov txuj ci:)

Kauj Ruam 1: Cov Khoom & Cov Cuab Yeej

Khoom siv

  • Circuit Playground Express (FYI: yuav hu qhov no "CPX" kom txuag kev ntaus ntawv)
  • MicroUSB rau USB cable
  • Hnab looj tes - siv cov hnab looj tes tuab lossis ib txheej nrog ntau txheej (kom tsis txhob luv luv cov xov hluav taws xob)
  • Cov Khoom Siv Hluav Taws Xob (~ 6 in. X 6 in.)
  • Cov Lus Cuam Tshuam (~ 24 nyob rau hauv.)
  • Xov tsis tu ncua (~ 24 nyob rau hauv.)
  • Velcro Strips (ob 1 hauv. X 1 nyob rau hauv.)

Cov cuab yeej

  • Xaws Koob
  • Txiab
  • thiab lil 'ua siab ntev..:)

Kauj Ruam 2: Tsim Lub Hnab looj tes maub los! (Pt. 1)

Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)
Tsim Lub Hnab looj tes maub los! (Pt. 1)

Koj tuaj yeem ua tus tswj lub ntsej muag yam tsis muaj hnab looj tes, tab sis lub hnab looj tes tswj ua rau nws yooj yim mus ua si, khaws CPX nyob rau tib qho kev taw qhia (tseem ceeb heev), thiab txhais tau tias koj tuaj yeem siv koj cov ntiv tes ntxiv rau kev tswj hwm!

1. Txiav cov duab plaub ntawm cov ntaub qhwv rau cov ntiv tes (~ 0.5 in. X 1 in.)

2. Siv xov tsis tu ncua los xaws cov ntaub qhwv ntaub mus rau txhua tus ntiv tes tes

Tawm tswv yim kom siv lub cim xeeb lossis lwm tus cwj mem kom tsis txhob xaws ob sab ntawm lub hnab looj tes ua ke (kawm los ntawm kuv qhov yuam kev bbies).

3. Txuas CPX rau lub hnab looj tes nrog velcro squares

Kauj Ruam 3: Tsim Lub Hnab looj tes maub los! (Pt. 2)

Tsim Lub Hnab looj tes maub los! (Pt. 2)
Tsim Lub Hnab looj tes maub los! (Pt. 2)
Tsim Lub Hnab looj tes maub los! (Pt. 2)
Tsim Lub Hnab looj tes maub los! (Pt. 2)
Tsim Lub Hnab looj tes maub los! (Pt. 2)
Tsim Lub Hnab looj tes maub los! (Pt. 2)

4. Siv tus nab kuab lossis kab xaim txuas mus txuas rau CPX av ("GND") rau tus ntiv tes xoo

5. Xaws xov xov los ntawm CPX cov khoom siv kov tau (A1, A2, A3 & A4) rau txhua ntawm plaub tus ntiv tes

6. Yog tias koj muaj lub ntsuas cua, xyuas qhov txuas nruab nrab ntawm CPX pins thiab cov xov xov uas siv tau.

Kauj Ruam 4: Npaj Tawm Tus Tswj Game

Npaj Tawm Tus Tswj Game!
Npaj Tawm Tus Tswj Game!

Thawj! Peb yuav tsum ua dab tsi los tswj Minecraft (lossis lwm qhov kev ua si txaus)?

Nov yog qhov pab tau zoo & lom zem kawm hauv Tsim Kev Xav, tab sis koj tuaj yeem hla qhov no yog tias koj xav tsuas yog siv kuv cov kev tswj hwm. Koj tuaj yeem rov qab los ntawm no ntxiv yog tias koj xav hloov pauv tom qab: D

1. Txiav txim siab (tseem ceeb) kev tswj hwm kev ua si

Nco tseg: Pib yooj yim! Xam tawm qhov kev tswj hwm tseem ceeb tshaj plaws rau kev ua si thiab pib muaj. Koj tuaj yeem ntxiv ntxiv tom qab.

Nov yog cov kev tswj hwm uas kuv xav siv thaum ua si Minecraft.. hauv kev muaj tswv yim hom:) (koj tuaj yeem siv tib yam lossis hloov kho koj tus kheej cov tswj!):

Kev txav chaw:

  • Mus tom ntej: W key
  • Khiav: Ctrl + W.
  • Dhia: Space bar
  • Saib sab laug & sab xis: Nas tig
  • Taug kev rov qab: S tus yuam sij

Kev ua:

  • Kev Tawm Tsam: Mouse Left Click
  • Qhov Chaw Thaiv/Laub/Qhib: Mouse Right Click
  • Cov khoom lag luam: E qhov tseem ceeb
  • Escape: ESC qhov tseem ceeb

2. Txiav txim siab yuav ua li cas koj xav siv tes taw thiab/lossis cov ntiv tes txhawm rau ua rau cov kev tswj hwm no. Pom zoo kom kos tawm koj li phiaj xwm

Nov yog kuv tus txheej txheem kev xav:

Kuv ib txwm xav xav zoo li kuv tau ua * hauv * kev ua si, yog li kuv tau mus rau "pheej yig VR" txoj hauv kev thiab siv tes taw los tswj kev txav chaw yooj yim. Txog kev taug kev, Kuv tau mus "cia li txav kuv txhais caj npab zoo li kuv tab tom taug kev", uas yooj yim hloov mus rau hauv kev dhia thiab dhia los ntawm kev ua kom nrawm dua.

Txhawm rau ua kom yooj yim tso cov khoom thaiv lossis pauv khoom, Kuv txiav txim siab siv qhov "ua tsis tau tes tuav" txav.

Kev tig yog qhov nyuaj me ntsis, tab sis kuv lub hom phiaj yog kom tuaj yeem saib ib puag ncig los ntawm kev txav kuv txhais tes rau hauv qhov kev xav uas kuv xav saib.

Kev tawm tsam tau dhau los ua tus ntiv tes ntsuas phoo, khaws cov ntiv tes nruab nrab (uas kuv tau tshem tawm tas lawm), Khiav lub ntiv tes ntiv tes ntiv tes, thiab cov ntiv tes ntiv tes pinky kom kuv taug kev rov qab.

Ib zaug ntxiv, koj tuaj yeem khaws cov kev tswj hwm tib yam lossis tsim koj tus kheej: D

Kauj Ruam 5: Cia Peb Tau Txais Txoj Haujlwm: Teeb CPX

Cia Peb Tau Txais Txoj Haujlwm: Teeb CPX!
Cia Peb Tau Txais Txoj Haujlwm: Teeb CPX!

1. Yog tias koj siv Windows, rub Adafruit Windows Drivers ntawm no.

2. Rub tawm & khaws daim ntawv kawg CPX Circuit Python UF2.

3. Plug hauv CPX nrog USB cable (xyuas kom nws muaj peev xwm xa cov ntaub ntawv)

4. Ob-nias lub khawm pib dua ntawm CPX

Cov LEDs yuav tsum tig ntsuab. Yog tias lawv liab, nws txhais tau tias muaj qee yam tsis raug ntawm cov ntaub ntawv xa mus rau CPX - txheeb xyuas lub USB cable, sim lwm USB chaw nres nkoj ntawm koj lub computer, lossis sim tso siab "ntsaws thiab ntsaws rov qab" hauv txoj hauv kev.

5. Hauv koj lub khoos phis tawj, koj yuav pom lub disk tshiab hu ua "CPLAYBOOT"

6. Luag CPX Circuit Python UF2 cov ntaub ntawv mus rau daim disk

7. Qhov "CPLAYBOOT" tsav yuav ploj thiab hloov nrog "CIRCUITPY"

Kauj Ruam 6: Ntxiv Txhua Lub Tsev Qiv Ntawv

Ntxiv Txhua Lub Tsev Qiv Ntawv!
Ntxiv Txhua Lub Tsev Qiv Ntawv!

Cov tsev qiv ntawv tso cai rau peb nkag mus rau txhua yam tshwj xeeb kev ua haujlwm rau CPX yam tsis tas yuav ua tuj ntawm cov phiaj xwm.. hooray qhib qhov chaw! Qhov kev teeb tsa no yuav rub tawm feem ntau ntawm tus qauv MicroPython cov tsev qiv ntawv*. Nkag mus rau lawv thaum koj so kom paub ntau yam txias uas koj tuaj yeem ua!

1. Rub tawm thiab khaws Adafruit Circuit Python Library Bundle Release los ntawm no

2. Unzip daim nplaub tshev, qhib thawj daim nplaub tshev, thiab luam daim nplaub tshev lib mus rau "CIRCUITPY" tsav

*Nws tsis zoo li koj yuav ploj ntawm qhov chaw txij li CPX los nrog tsawg kawg 2MB ntawm Flash cia. Tab sis, yog tias koj xav tau qhov chaw ntxiv, koj tuaj yeem rov mus saib cov tsev qiv ntawv thiab tshem tawm qhov uas koj tsis xav tau. Yog tias koj mess 'em tawm, tsuas yog theej thiab muab tshuaj txhuam rau hauv daim nplaub tshev lib dua.

Kauj Ruam 7: Sau Tus Tswj Tus lej

Sau Cov Cai Tswj!
Sau Cov Cai Tswj!

CPX muaj tus sau ua ke ntawm lub rooj tsavxwm, uas txhais tau tias koj tuaj yeem ua haujlwm nws hauv (zoo nkauj npaum li cas) txhua yam lus uas koj xav tau! Kuv xaiv rau MicroPython, ib qho version ntawm Python rau microcontrollers, 'ua rau Python txaus.

Nyeem cov theem no yog tias koj xav nkag siab qhov kev zov me nyuam ua haujlwm li cas (qhia tseeb) lossis yog tias koj xav hloov kho nws los tsim koj tus kheej version.

Nov yog GitHub chaw cia khoom uas muaj cov lej tag nrho. Rub tawm nws, rub nws mus rau koj lub CPX, thiab hloov npe cov ntaub ntawv "Code.py" (ntawm no yog tus lej nyoos yog tias koj xav tsuas yog luam & muab tshuaj txhuam)

1. Txhawm rau ua yam peb xav tau nrog peb tus tswj hwm, peb xav tau cov tsev qiv ntawv MicroPython hauv qab no:

  • LIS3DH accelerometer

    Qhov no tso cai rau peb siv cov lus tsa suab kom ua rau ntau yam

  • Human Interface Device ("HID") keyboard

    Lub tsev qiv ntawv no tso cai rau peb los tswj cov keyboard

  • HID mus

    Lub tsev qiv ntawv no txhais tau tias peb tuaj yeem tswj tus nas

  • CPX capacitive kov

    Lub tsev qiv ntawv no cia peb siv lub peev xwm kov lub ntsej muag ntawm CPX, hooray

  • Ob peb ntawm lwm lub tsev qiv ntawv los ua peb lub neej yooj yim dua: sijhawm, busio, thiab board.

2. Kho thiab pib ua cov tsev qiv ntawv

Muab cov kev hloov pauv rau cov keyboard, nas, thiab cov khoom siv nrawm. Xaiv qhov ntau rau qhov ntsuas qhov ntsuas.

3. Sau cov haujlwm luv rau txhua qhov kev tswj hwm

Kev tswj cov lus tsa suab tuaj yeem nyuaj. Ua qee qhov kev sim thawj zaug nrog lub ntsuas qhov ntsuas los ntawm kev luam tawm qhov tseem ceeb hauv tus lej saib (hauv qhov chaws, mus rau _muaj_ ua haujlwm thiab tsis pom zoo ob txoj kab debugging). Qhov no yuav pab koj txiav txim siab qhov pib rau taug kev, khiav thiab dhia, saib sab laug thiab sab xis, thiab tso khoom.

Qhov kov cov ntaub ntawv ua kom yooj yim dua li koj tsuas yog tab tom nrhiav lub peev xwm ua kom muaj tseeb (Muaj tseeb/Tsis tseeb).

Nco ntsoov tso tag nrho cov keyboard thiab nas tuav ntawm qhov kawg ntawm txhua txoj haujlwm

Kauj Ruam 8: Debugging: Pom Dab Tsi Nrog CPX Code

Debugging: Pom Dab Tsi Ntxiv Nrog CPX Code
Debugging: Pom Dab Tsi Ntxiv Nrog CPX Code
Debugging: Pom Dab Tsi Ntxiv Nrog CPX Code
Debugging: Pom Dab Tsi Ntxiv Nrog CPX Code

Yog tias koj paub nrog Arduino, tej zaum koj yuav paub nrog Serial Monitor. CPX muaj cov yam ntxwv zoo ib yam nrog qhov nkag me ntsis sib txawv nyob ntawm seb qhov program twg koj tab tom siv.

Yog tias koj tab tom siv Mu nws yooj yim heev: cov ntawv txuas tau tsim hauv thiab yuav txiav txim siab koj lub rooj tsavxwm, yoj!

Yog tias koj siv Idle lossis lwm qhov haujlwm, ua raws cov theem no:

1. Rub PuTTY* ntawm no

2. Mus rau Windows Device Manager thiab kos tus lej chaw nres nkoj rau CPX (piv txwv li COM18) - saib Duab 1

Yog tias muaj ntau qhov chaw nres nkoj teev tseg, tshem tawm CPX thiab ntsaws nws rov qab los saib qhov twg ploj mus ces rov tshwm sim.

3. Qhib PuTTY thiab xaiv "Serial"

4. Nkag mus rau tus lej chaw nres nkoj (piv txwv li COM18) hauv qab "Kab ntawv txuas" thiab tus lej baud ntawm 115200 nyob rau hauv "Ceev"

5. Nyem Txuas

*PuTTY yog pub dawb thiab qhib-qhov SSH thiab kev sib txuas hauv xov tooj cua.

Kauj Ruam 9: Kuaj & Txhim Kho

Image
Image
Kuaj & Txhim Kho
Kuaj & Txhim Kho

Thauj qhov program mus rau CPX los ntawm kev rub thiab xa cov ntaub ntawv nab npawb mus rau CIRCUITPY tsav, tom qab ntawd hloov npe cov ntawv ua "Code.py"

Zoo li zoo nkauj npaum li txhua txoj haujlwm, qhov no yuav zoo li me ntsis thaum koj xub pib nws ua haujlwm. Yog tias cov ntaub qhwv tau ua rau coj txawv txawv, rov pib dua CPX (qhov no rov ua dua tus lej nkag tau zoo).

Kuaj 1:

- Qhib cov ntawv saib nrog PuTTY thiab khiav qhov program (CTRL + D)

- Kuaj txhua qhov kev tswj hwm kev txav chaw (koj yuav pom nas txav ntawm lub vijtsam thiab xyuas kom lub program tsis sib tsoo nrog rau cov ntaub so (uas yuav tsum tso saib cov ntawv muaj feem cuam tshuam ntawm tus saib xyuas)).

Xeem 2:

Muab tso rau hauv Minecraft hom kev muaj tswv yim! Kuaj qhov kev txav chaw thiab kev tswj hwm saib seb puas muaj dab tsi tawg lossis tsis ua haujlwm raws li qhov xav tau (plz nco ntsoov tias qhov no yog daim qauv)

Hloov kho qhov program raws li koj qhov kev xeem. Nco ntsoov, nws zoo yog tias nws tsis zoo tag nrho, muaj lub sijhawm los ua kom nws zoo dua!

Kauj Ruam 10: Muaj Kev Lom Zem

Muaj Kev Lom Zem !!
Muaj Kev Lom Zem !!
Muaj Kev Lom Zem !!
Muaj Kev Lom Zem !!

Koj tau npaj txhij los hla Minecraft !! Tsuas yog ceev faj ntawm cov dab, nws yuav ua rau me ntsis kom tiv thaiv koj tus kheej..

Ntxiv rau koj tus tes taw tswj nrog cov keyboard yog lub tswv yim zoo yog tias koj xav ua si rau qhov tseeb:)

Thov nyiam thiab/lossis tawm lus tawm yog tias koj nyiam qhov kev qhia! Thiab tau kawg, qhia rau kuv paub yog tias koj muaj lus nug lossis lus nug! Zoo Siab Tsev!

<3, jenfoxbot

Pom zoo: