Cov txheej txheem:

DIY Video Game Siv Arduino (Arduboy Clone): 7 Kauj Ruam (nrog Duab)
DIY Video Game Siv Arduino (Arduboy Clone): 7 Kauj Ruam (nrog Duab)

Video: DIY Video Game Siv Arduino (Arduboy Clone): 7 Kauj Ruam (nrog Duab)

Video: DIY Video Game Siv Arduino (Arduboy Clone): 7 Kauj Ruam (nrog Duab)
Video: 5 AMAZING Arduino project DIY 2024, Kaum ib hlis
Anonim
Image
Image
DIY Video Game Siv Arduino (Arduboy Clone)
DIY Video Game Siv Arduino (Arduboy Clone)
DIY Video Game Siv Arduino (Arduboy Clone)
DIY Video Game Siv Arduino (Arduboy Clone)
DIY Video Game Siv Arduino (Arduboy Clone)
DIY Video Game Siv Arduino (Arduboy Clone)

Muaj 8 qhov me me, credit card qhov loj me ua si platform hu ua Arduboy, uas ua rau qhib qhov kev ua si yooj yim kawm, sib qhia thiab ua si.

Koj tuaj yeem txaus siab 8-ntsis kev ua si los ntawm lwm tus ntawm lub cuab yeej no, lossis koj tuaj yeem ua koj tus kheej kev ua si. Txij li nws yog qhov phiaj xwm qhib thiab siv arduino, Kuv txiav txim siab los ua kuv tus kheej version ntawm nws.

Kuv lub hom phiaj yog tsim PCB uas yooj yim los ua siv cov txheej txheem hloov pauv toner. Yog li kuv tau ua cov kab thiab cov ntaub qhwv kom loj li sai tau. Yog tias koj tsis xav kos npe rau PCB, koj tuaj yeem ua ib qho ntawm daim ntawv ci lossis Perfboard.

Kauj Ruam 1: Sau cov Cheebtsam

Koj yuav xav tau:

  1. Arduino Pro micro (TSIS Pro Mini. Pro micro ib nrog ATmega32u4 nti)
  2. 7 Pin SPI OLED Zaub
  3. 4 Pin Momentary Push Button (12x12x7.3mm)
  4. Copper clad (Yog tias koj tab tom ua PCB) lossis koj tuaj yeem siv Breadboard / Prefboard.
  5. Swb Hloov
  6. 3v Button cell thiab tus tuav
  7. Poj Niam Header Pins
  8. Piezo Electric buzzer phaj

CEEB TOOM: Koj yuav tsum paub tseeb tias koj muaj ATmega32u4 raws li pro micro thiab 7 tus pin qub zaub, txwv tsis pub txoj haujlwm yuav tsis ua haujlwm

Tom qab ua tiav txoj haujlwm no kuv tau pom tias, 3v lub xov tooj ntawm tes tsuas tuaj yeem ua lub zog ua si tsawg dua li ib feeb. Txij li thaum kuv tab tom siv USB cable los txuas kuv lub zog, kuv tsis tau thab rov tsim cov ntawv PCB. Yog li txiav txim siab siv roj teeb muaj zog ntau dua yog tias koj xav tau kev ua kom tiav

Kauj Ruam 2: Ua PCB

Ua PCB
Ua PCB
Ua PCB
Ua PCB
Ua PCB
Ua PCB
Ua PCB
Ua PCB

Koj tuaj yeem kos ib qho kev cai PCB siv cov txheej txheem hloov pauv toner, lossis koj tuaj yeem muab cov khoom sib xyaw ua ke rau hauv pawg thawj coj ua siv cov lej.

Rub tawm cov ntawv PCB los ntawm no thiab kos nws.

Txuas:

Kuv tau sim ua PCB no ua DIY tus phooj ywg zoo li sai tau. Nws muaj cov cim loj thiab cov ntaub qhwv dav. Qhov ntawd yuav ua rau txheej txheem etching thiab ua kom yooj yim dua. Yog tias koj tsis muaj kev paub dhau los nrog PCB ua ntej ua ntej, ua raws cov lus qhia no.

www.instructables.com/id/Making-A-Customiz…

Kauj Ruam 3: Muab Tshuaj Txhuam Txhuam

Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam
Solder cov Cheebtsam

Solder lub 6 Laub khawm, swb swb thiab lub roj teeb rau PCB.

(Yog tias koj tab tom yuav lub zog ua si siv USB cable ces koj tsis xav tau lub roj teeb.)

Peb tsis ncaj qha soldering arduino thiab oled zaub rau PCB, vim peb tuaj yeem siv lawv rau qee qhov haujlwm yav tom ntej. Solder tus poj niam header pins rau PCB ua ntej thiab muab cov oled zaub thiab arduino rau headers. Qhov no yuav ua rau kom tuab ntawm peb cov arduboy tab sis peb tuaj yeem tshem tawm cov khoom no yog tias peb xav tau.

Muaj jumper xaim mus rau tus hais lus. Nws tau hais txog xim liab hauv cov ntaub ntawv PCB. Siv ib daim hlau los ua qhov kev sib txuas no.

Txhawm rau txuas lub piezo hluav taws xob buzzer, txuas ob lub xov hlau rau lub phaj buzzer thiab muab cov hlau txuas rau PCB. Txuas lub phaj buzzer rau PCB siv daim kab xev ob tog.

Txuas cov arduino thiab OLED cov duab rau cov kab taub hau sib xws.

Yog tias koj tab tom ua txoj haujlwm no ntawm lub khob cij, tom qab ntawd txhua yam koj yuav tsum tau ua yog tsuas yog txuas cov khoom siv raws li tau teev tseg hauv kab lus. Ntawm no kuv ua tus cais joystick siv 6 lub nyees khawm thiab txuas lawv rau ntawm daim ntawv qhia zaub mov.

Cov Kev Sib Txuas yog:

Txuas Txhua lub khawm rau GND ntawm arduino.

BUTTON_UP -> Pin A0 ntawm Arduino

BUTTON_DOWN -> Pin A3 ntawm Arduino

BUTTON_LEFT -> Pin A2 ntawm Arduino

BUTTON_RIGHT -> Pin A1 ntawm Arduino

BUTTON_A -> Pin 7 ntawm Arduino

BUTTON_B -> Pin 8 ntawm Arduino

Hais lus -> Tus Pin 5 ntawm Arduino

OLED tus pin GND thiab CS -> GND tus pin ntawm arduino

OLED tus pin VCC -> VCC ntawm arduino

OLED tus pin SCK -> Digital pin 15 ntawm arduino

OLED pin SDA -> Digital pin 16 ntawm arduino

OLED tus pin RES -> Digital pin 6 ntawm arduino

OLED tus pin DC -> Digital pin 4 ntawm arduino

Kauj ruam 4: Rub tawm Arduino IDE

Koj yuav tsum rub tawm thiab teeb tsa arduino IDE txhawm rau rub tawm game.

Koj tuaj yeem rub tawm arduino IDE los ntawm qhov txuas hauv qab no:

www.arduino.cc/en/main/software

Rub tawm thiab teeb tsa arduino IDE rau koj lub khoos phis tawj los ntawm qhov txuas saum toj no.

Kauj Ruam 5: Txhim Kho Tsev Qiv Ntawv

Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv

Txhawm rau sau thiab tso game rau koj tus arduboy koj yuav tsum teeb tsa qee lub tsev qiv ntawv.

Kuv yuav teev qee qhov tseem ceeb hauv qab no.

github.com/Arduboy/Arduboy

github.com/MLXXXp/Arduboy2

github.com/MLXXXp/ArduboyTones

github.com/TEAMarg/ATMlib

github.com/Arduboy/ArduboyPlaytune

github.com/igvina/ArdBitmap

Nyem rau Clone lossis rub tawm khawm thiab nyem Download ZIP

Mus rau cov kab ntawv txuas no thiab nyem rau clone lossis rub tawm thiab rub tawm zip. Qhib arduino IDE thiab nyem rau

Sketch> Suav nrog Tsev Qiv Ntawv> ntxiv. ZIP tsev qiv ntawv

thiab xaiv cov ntawv zip uas tau rub tawm. Rov ua qhov no rau txhua cov ntaub ntawv.

Lwm txoj kev

Hloov chaw rub tawm thiab teeb tsa.zip cov ntaub ntawv, koj tseem tuaj yeem teeb tsa lub tsev qiv ntawv siv Arduino IDE Library Manager:

Sketch> suav nrog Tsev Qiv Ntawv> Tswj Tsev Qiv Ntawv

tom qab ntawd nkag mus rau lub tsev qiv ntawv lub npe hauv Lim koj qhov kev tshawb nrhiav.

Kauj Ruam 6: Tshaj Tawm Kev Ua Si

Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si
Tso Kev Ua Si

Txhawm rau txheeb xyuas seb kho vajtse ua haujlwm tau zoo, mus rau:

File -> Piv txwv -> Arduboy -> ArduBreakout

thiab nyem upload. Yog tias txhua yam ua haujlwm raug koj tuaj yeem ua si sib ntaus sib tua ntawm koj tus arduboy.

Nco ntsoov tias koj tau xaiv pawg thawj coj los ua arduino Leonardo lossis Arduino/Genuino Micro

Koj tuaj yeem pom ntau qhov kev ua si rau koj tus arduboy los ntawm cov chaw no:

community.arduboy.com/c/games

www.team-arg.org/games.html

Qee zaum koj yuav ntsib qhov yuam kev xws li:

yuam kev tuag: ArduboyPlaytune0.h: Tsis muaj cov ntaub ntawv lossis cov npe

#suav nrog

^

muab tso ua ke lawm

tawm qhov xwm txheej 1 Ua yuam kev ua ke rau board Arduino/Genuino Micro

thaum upload game.

Txhawm rau kho qhov yuam kev no, tshawb nrhiav lub tsev qiv ntawv lub npe uas ploj lawm ntawm

Rub tawm thiab teeb tsa lub tsev qiv ntawv zoo li peb tau ua dhau los.

Nov yog daim vis dis aus:

Kauj ruam 7: Txaus siab rau

NCO TSEG:

Kuv tau txuas tus pin tus hais lus thib ob rau hauv av, hloov ntawm Arduino tus pin 13 zoo li Arduboy tiag. Yog li ntawd, lub suab rau qee qhov kev ua si yuav tsis ua haujlwm zoo Kuv tsis tau suav nrog RGB LED uas Arduboy tiag tiag muaj. Yog li ntawd, kev ua si uas siv RGB LED yuav ploj ntawm cov teebmeem LED thiab yuav nyuaj rau ua si.

Ua tsaug ntau rau MLXXXp los ntawm zej zog arduboy rau taw qhia qhov ua yuam kev.

Nov yog kuv thawj qhov tsis tsim nyog, Yog li nws tsis zoo tag nrho. Yog tias koj xav tau kev pab nrog txoj haujlwm no thov qhia rau kuv paub hauv cov lus.

Pom zoo: