Cov txheej txheem:

Game Console: 4 Kauj Ruam
Game Console: 4 Kauj Ruam

Video: Game Console: 4 Kauj Ruam

Video: Game Console: 4 Kauj Ruam
Video: Will A $40 PS4 Work? 🤨 2024, Hlis ntuj nqeg
Anonim
Game Console
Game Console
Game Console
Game Console
Game Console
Game Console

Qhov kev ua si yooj yim tiag tiag, txhawb nqa cov ntawv qhia zaub mov, tetris thiab nab. Nws tau ua siv

- ob 8x8 Square Matrix Red LED Display dot Module74hc595 Tsav pom ntawm no

- ib STM32F103 Nucleo-64

- 4 khawm thiab 4 tus tiv thaiv

- cov xov hlau, lub khob cij, cov dhia, thiab lwm yam.

- cov khoom siv hauv tsev, cov ntsia hlau, cov laug cam, thiab lwm yam (cov ntawd muaj txiaj ntsig zoo txog cov khoom lag luam)

Koj tuaj yeem siv:

- stm32f phau ntawv pom ntawm no

- hc595 cov ntawv xov xwm pom ntawm no

- qee qhov Suav coj-matrix

Kauj ruam 1: Kev sib tham

Ntawm no koj tuaj yeem pom yuav ua li cas txuas cov khoom:

- laub khawm

- npo

Dab tsi GPIO pins koj xaiv rau kev tawm tswv yim thiab tso tawm feem ntau tsis muaj feem cuam tshuam, tab sis kuv tau xaiv lub vijtsam pins los ntawm GPIOA thiab khawm pins los ntawm GPIOB.

Kauj ruam 2: Tsim

Txog kev nqa koj tus lej koj tuaj yeem mus nrog qee yam hu ua SEGGER lossis nrog (qhov no yog qhov kuv tau siv) qhov no.

- openocd yog lub server rau koj tus debuger

st-link yog koj tus programmer

-gcc-arm-none-eabi yog koj li cuab yeej programming

- nco ntsoov tias nyob rau hauv ib txwm/openocd.conf kuv xav hloov pauv mus rau:

qhov [nrhiav interface/stlink-v2-1.cfg]

qhov chaw [nrhiav lub hom phiaj/stm32f1x.cfg] reset_config srst_only srst_nogate

- Kuv kuj xav tau hloov tsab ntawv.ld thiab siv lwm qhov txuas dua uas tau qhia hauv qhov piv txwv kom tau txais qhov debugger rau caj npab. Tseem nco ntsoov tias hauv cov piv txwv stm32f10x_it.* Cov ntaub ntawv tsis txuas rau hauv cov ntaub ntawv tsim.

Kauj ruam 3: Code

Cov cai yog yooj yim haum. Cov laj thawj tau faib ua qhov loj.c, Tsav Tsheb.*, Ntawv qhia zaub mov.*, Tetris.*Thiab Noog.*. Cov lus piav qhia luv yog tias Tsav Tsheb muaj lub luag haujlwm los cuam tshuam nrog kho vajtse. Hauv qhov tseem ceeb koj tuaj yeem pom tus tsav tsheb thiab cov ntawv qhia zaub mov pib thiab pom tias nyob rau lub sijhawm lub voj tshuab raj tswj kev cuam tshuam nrog lwm ob qhov kev ua si. Koj tseem tuaj yeem pom yuav ua li cas kev ua si tau ntxiv rau hauv cov ntawv qhia zaub mov. Txhua qhov kev ua si muaj qhov pib ua ntu zus thiab hloov kho tshiab. Hloov kho tshiab muaj cov laj thawj, kev txhais lub xeev thiab kev kos duab.

Kauj ruam 4: Siv

Koj pib hauv cov ntawv qhia zaub mov. Koj tuaj yeem xaiv lwm yam khoom ntawm nplooj ntawv los ntawm kev siv nce thiab nqis. Thaum cov khoom kawg ntawm nplooj ntawv raug xaiv koj tuaj yeem hloov pauv ntawm cov nplooj ntawv ua si. Tam sim no tsuas muaj ib nplooj ntawv thiaj li tsis muaj qhov tshwj xeeb no siv. Thaum nyob ntawm cov khoom game koj tuaj yeem siv txoj cai tseem ceeb los ua si game.

Thaum koj nkag mus rau qhov kev ua si koj tau nkag mus rau lub vijtsam pib qhov twg koj yuav tsum nias lub pob kom pib lossis nce kom tawm. Tom qab poob qhov kev ua si koj yuav tsum nias tus yuam sij nce mus rau hauv lub vijtsam pib.

Rau Tetris qhov kev tswj hwm hauv-kev ua si yog tig rau daim, nqes kom nrawm dua qhov poob ntawm daim, sab laug thiab sab xis txav daim sab laug thiab sab xis.

Tus yuam sij sab laug yog qhov ze tshaj plaws rau kab uas txuas nws mus rau lub console.

Pom zoo: