Cov txheej txheem:

ZAP Game Gun: 7 Kauj Ruam
ZAP Game Gun: 7 Kauj Ruam

Video: ZAP Game Gun: 7 Kauj Ruam

Video: ZAP Game Gun: 7 Kauj Ruam
Video: The Ultimate Guide to NES Light Guns 2024, Kaum ib hlis
Anonim
ZAP Game Phom
ZAP Game Phom
ZAP Game Phom
ZAP Game Phom

Los ntawm Cov Lus Qhia no, Kuv xav qhia koj txog kuv rab phom game. Lub ntsiab lus ntawm txoj haujlwm no yog txhawm rau txhim kho rab phom arcade game. uas koj tuaj yeem tsis pub dhau 2 txog 3 teev. Yog tias koj sim piav qhia nws koj yuav qhia nws ua ke, keyboard thiab cua nas.

rab phom no tuaj yeem siv rau kev ua si ntau yam FPS kev ua si.

TSHUAJ

Kev txhawb siab ntawm rab phom game no yog nws tus kheej los ntawm kev ua si arcade. Txoj haujlwm no yog qhov sib tw zoo tshaj plaws rau cov neeg nyiam kev ua si, ntxiv rau yog tus kiv cua ntawm Arduino.

Nws yog txoj haujlwm uas yuav tsis xav tau sijhawm ntau dua 3 teev.

Ua haujlwm

Kev ua haujlwm ntawm txoj haujlwm yog yooj yim ib yam li ABC!

txheej txheej haujlwm ua haujlwm nrog txheej thiab, lwm yam xwm txheej tsim tag nrho cov cai.

rab phom replicates cua nas thiab keyboard. Lub gyroscope tam sim no hauv rab phom pab txhawm rau taug kev txav ntawm rab phom thiab hais kom lub khoos phis tawj tso tus nas taw tes rau ntawm qhov chaw hauv qab no.

zoo sib xws, joystick tam sim no hauv rab phom sim ua dua cov joystick tam sim no hauv game game. Nws pab cov neeg siv mus rau pem hauv ntej, nraub qaum, sab xis, sab laug hauv qhov kev ua si. Ntxiv rau qhov no, nws kuj pab dhia.

IR sensor pab ua kom lub hom phiaj a

*txhua qhov saum toj no*

Koj tuaj yeem tsuas yog hloov tus yuam sij hauv txoj haujlwm raws li qhov kev ua si.

Khoom siv

Yam uas koj yuav xav tau los ua qhov haujlwm no yog:

  1. Arduino Leonardo.
  2. MPU-6050/gyroscope
  3. Joystick
  4. Tactile Push khawm
  5. PCB etching cov khoom siv
  6. xaim
  7. txiv neej berg strip
  8. poj niam berg strip.
  9. IR sensor

*Koj tuaj yeem tau txais cov khoom siv no online lossis hauv khw muag khoom hauv zos.*

Kauj Ruam 1: KAUJ RUAM 1: Ua Tus Circuit

KAUJ RUAM 1: Ua Circuit Court
KAUJ RUAM 1: Ua Circuit Court
KAUJ RUAM 1: Ua Circuit Court
KAUJ RUAM 1: Ua Circuit Court

Rau qhov no, koj yuav xav tau tooj liab clad thiab ferrous chloride tov.

Koj tuaj yeem tau txais ib qho twg nyob ntawm lub khw hluav taws xob hauv nroog lossis kuv pom zoo yuav 'PCB cov khoom siv kos duab'.

Tej zaum nws yuav yog cov cuab yeej muaj txiaj ntsig tshaj plaws rau cov txheej txheem no.

Txhawm rau ua daim duab PCB koj yuav tsum siv fritzing lossis koj tseem tuaj yeem siv EAGLE.

Kuv tau xa cov ntawv txuas rau PCB tsim hauv Cov Lus Qhia no.

Txhawm rau ua PCB koj tuaj yeem ua raws cov kauj ruam uas tau hais hauv Kev Ua Koj li PCB.

Kauj Ruam 2: Kauj Ruam 2: Txuas Circuit Court

Kauj Ruam 2: Txuas Circuit Court
Kauj Ruam 2: Txuas Circuit Court

Tom qab tsim cov PCB tsuas yog nce txhua qhov ntawm PCB.

*Koj tseem tuaj yeem siv daim ntawv qhia zaub mov rau*

*kev sib txuas thaum caij ntuj sov*

buttonPin = 4 buttonPin1 = 5

buttonPin2 = 6 buttonPin3 = 7

buttonPin4 = 8 buttonPin5 = 9;

buttonPin6 = 10 buttonPin7 = 11;

buttonPin8 = 12; buttonPin9 = 13;

buttonPin10 = A1; analogPin = 0;

buttonPINjoy = A2

VRyPIN = A3; VRxPIN = A4;

Kauj Ruam 3: KAUJ RUAM 3: Sib Sau Ua Ke

KAUJ RUAM 3: Sib dhos Xeem
KAUJ RUAM 3: Sib dhos Xeem
KAUJ RUAM 3: Sib dhos Xeem
KAUJ RUAM 3: Sib dhos Xeem
KAUJ RUAM 3: Sib dhos Xeem
KAUJ RUAM 3: Sib dhos Xeem

Ua ntej cov txheej txheem no, koj yuav tsum tau xaim lub ntsuas hluav taws xob thiab joystick rau poj niam burg strip kom lawv haum rau hauv tus txiv neej lub taub hau pins uas koj tau muab tso rau ntawm PCB.

Tam sim no, cov kauj ruam yog yooj yim.

Kuv tsis xav qhia ntau txog cov txheej txheem no.

Tsuas yog qhia koj, hauv cov txheej txheem no, koj yuav tsum qhib rab phom thiab sib sau ua ke (txuas) txhua ntu hauv phom.

Raws li rab phom yuav txawv nrog txhua tus neeg nws yog nyob ntawm koj yuav ua li cas sib sau ua ke.

Koj tuaj yeem pom hauv cov duab saum toj no qhov kuv npaj kuv rab phom.

Kauj Ruam 4: KAUJ RUAM 4: Txhim Kho Software

Txhawm rau siv rab phom koj yuav tsum rub tawm Arduino software thiab txhua yam game uas koj xav ua si.

Tag nrho cov no yog qhov xav tau ntawm rab phom.

siv rab phom tsuas yog txuas qhov chaw nres nkoj ntawm Arduino Leonardo mus rau USB chaw nres nkoj ntawm PC lossis Laptop.

rab phom yuav raug lees paub tias yog tus tso cai nas thiab keyboard rau lub cuab yeej.

Kauj Ruam 5: KAUJ RUAM 5: Kev Kho Kho Phom

Txhawm rau hloov kev tswj hwm ntawm rab phom koj yuav tsum hloov pauv qhov chaws ntawm rab phom.

Kuv yuav qhia qhov hloov chaw

yog (buttonState7 == LOW && previousButtonState == HIGH) {Keyboard.write ("j"); // tshwj xeeb granade}

yog tias (buttonState8 == LOW && previousButtonState == HIGH) {Keyboard.write ("f"); // khaws txhua yam riam phom}

yog (buttonState9 == LOW && previousButtonState == HIGH) {Keyboard.write (""); // hmo ntuj pom}

los hloov kev tswj hwm hloov cov tsiaj ntawv tawv nrog kev tswj hwm uas koj xav tau.

*cov xwm txheej zoo sib xws siv rau txhua qhov yog tias muaj xwm txheej.*

Kauj Ruam 6: KAUJ RUAM 6: Txaus siab rau

Tam sim no koj rab phom npaj txhij lawm

txaus siab rau nws …

Cov ntaub ntawv code

Kauj Ruam 7: KAUJ RUAM: 7: Kev txhim kho yav tom ntej

KAUJ RUAM: 7: Kev txhim kho yav tom ntej
KAUJ RUAM: 7: Kev txhim kho yav tom ntej

Raws li peb tham txog txhua yam, peb paub txhua yam yuav tsum hloov pauv nrog lub sijhawm.

yog li peb muaj kev txhim kho yav tom ntej hauv rab phom no

  1. Yuav tuaj yeem ua rab phom Bluetooth tsis siv USB cables.
  2. Muaj peev xwm ua tau tiag tiag.

Yog tias koj tau txais kev txhim kho yav tom ntej lossis cov lus pom zoo

thov

saib

nyob rau hauv seem saib

hauv qab no…

Pom zoo: