Cov txheej txheem:

Pong ntawm Arduino los ntawm Pierson thiab Jace: 5 Kauj Ruam (nrog Duab)
Pong ntawm Arduino los ntawm Pierson thiab Jace: 5 Kauj Ruam (nrog Duab)

Video: Pong ntawm Arduino los ntawm Pierson thiab Jace: 5 Kauj Ruam (nrog Duab)

Video: Pong ntawm Arduino los ntawm Pierson thiab Jace: 5 Kauj Ruam (nrog Duab)
Video: Don't Leave Her If You Can't Let Her Go - Chris Young 2024, Hlis ntuj nqeg
Anonim
Pong ntawm Arduino los ntawm Pierson thiab Jace
Pong ntawm Arduino los ntawm Pierson thiab Jace

Nov yog cov lus qhia yuav ua li cas ua si Pong ntawm arduino. Nws tau hais qhia hauv tsib kauj ruam yooj yim. Peb vam tias koj txaus siab rau peb qhov kev ua si!

Kauj Ruam 1: Cov Khoom Siv

Cov Khoom Siv
Cov Khoom Siv
Cov Khoom Siv
Cov Khoom Siv
Cov Khoom Siv
Cov Khoom Siv

Cov ntaub ntawv no yog yam peb siv, Yog tias koj pom siv rau lwm yam, tsuas yog nco ntsoov, cov no yog cov pob txha liab qab ntawm txoj haujlwm no.

-Arduino Nano/Uno

-Ntau ntawm jumper xov hlau

-8x8 matrix coj

-daim ntawv qhia

-potentiometers (2)

-Case (koj tuaj yeem siv ntau qhov xwm txheej tsis tshua kim, qhov no tsuas yog qhov uas peb tau siv)

- Daim kab xev npog (kom ruaj ntseg cov xov hlau rau lawv cov tswv yim)

Kauj Ruam 2: Fritzing Led Board

Fritzing Led Board
Fritzing Led Board

Tom qab koj muaj tag nrho cov ntaub ntawv, koj yuav tsum tau pib xaim. Hauv qab no yog cov ntaub ntawv rau kab kos uas yuav pab koj xaim Pong no kom raug. Thaum koj ua tiav kev txuas cov xov hlau mus rau lub matrix coj pawg thawj coj los ntawm arduino, koj yuav tsum pom tag nrho cov coj teeb pom kev thoob plaws lub rooj tsavxwm. Yog tias tsis yog, hmoov tsis koj yuav tau pib dua. Thaum peb ua qhov no, nws siv sijhawm tsib zaug kom tau txais qhov txias txias. Nws tsis ua li cas yog tias koj tsis tau txais nws thawj zaug. Lub hom phiaj yog ua kom tiav qhov no, txawm tias nws yuav tsum ua siab ntev.

Nco tseg: Koj yuav tsis tuaj yeem ua si- yog li tsis txhob cia siab tias yuav ua.

Kauj Ruam 3: Txuas Txoj Cai

Raws li neeg feem coob tsis paub yuav ua li cas hauv C Plus lus, peb tau muab tus lej rau koj. Hauv qab no yog daim ntawv theej ntawm kab ntawv txuas uas koj tuaj yeem nkag mus los ntawm codebender.cc, theej thiab muab tshuaj txhuam nws.

codebender.cc/sketch:594853

Thaum koj tau txais cov cai no, rub nws mus rau koj li arduino. Rau cov ntawm koj uas tsis paub yuav ua li cas, koj tsuas yog ua kom ntseeg tau tias koj lub arduino tau txuas rau hauv koj lub khoos phis tawj, thiab tom qab ntawd koj nyem rau sab saum toj ntawm qhov uas koj cov cai tau qhia, nyem rau "Txheeb Xyuas", thiab tom qab ntawd ib zaug nws tau txheeb xyuas koj yuav nyem rau "Khiav ntawm Arduino". Koj lub rooj tsav xwm hauv vaj huam sib luag yuav tsum pib nrog cov lus thiab tom qab ntawd koj yuav tsum tuaj yeem ua si, rho tawm cov potentiometers.

Kauj Ruam 4: Txuas Potentiometers thiab Xeem

Txuas Potentiometers thiab Xeem
Txuas Potentiometers thiab Xeem

Cov kauj ruam tom ntej no yog qee qhov lom zem, hauv peb lub tswv yim. Tom qab ntau fritzing, muaj ntau dua-thiab tseem ua si game. Tom qab koj tau fritzed lub matrix board thiab cov game ua haujlwm, nws yog lub sijhawm kom nws npaj ua si. Cov kauj ruam tom ntej yog txhawm rau txuas ob lub zog- thiab sim seb lawv puas ua haujlwm, los ntawm kev ua si game. Nrog daim duab fritzing yog ob lub hwj chim, thiab lawv tau txuas nrog rau arduino. Cov potentiometers no tseem ceeb heev rau kev ua si vim tias lawv nkag siab qhov txav koj ua nws thiab txuas qhov ntawd rau tus coj. Muab cov potentiometers zoo li lawv nyob hauv daim duab thiab tom qab ntawd koj tuaj yeem sim yog tias Pong ua haujlwm zoo. Yog tias tsis yog, muaj teeb meem nrog txoj hlua lossis txoj hauv kev uas cov potentiometers txuas rau ntawm lub rooj tsavxwm. Kuaj nws kom txog thaum qhov kev ua si ua haujlwm, thiab tom qab ntawd muaj kev lom zem.

Kauj Ruam 5: Ua tiav Pong

Qhov kawg Pong
Qhov kawg Pong

Tam sim no koj tau ua tiav pong, cov kauj ruam kawg yog ua kom yooj yim ua si. Kuv txhais li cas los ntawm qhov uas tso lub rooj sib txig sib luag hauv rooj plaub thiab khaws cov xov hlau nrog nws kom nws zoo li zoo, zoo, thiab nkag tau yooj yim. Koj xav kom tib neeg saib nws thiab xav tias, "Wow! Uas zoo li yog kev ua si nthuav!" Txawm li cas los xij, yog tias koj qhov kev ua si tseem raug dai ntawm lub khob cij nrog txhua lub xov hlau hauv qhov tsis sib haum, tib neeg yuav saib nws thiab xav tias: "Dab tsi yog qhov ntawd? Vim li cas nws thiaj li ntxiag?" Txhawm rau txuas lub rooj tsav xwm hauv koj rooj plaub thiab ua tiav zais cov xov hlau, hauv peb cov lus qhia, txoj hauv kev los ua qhov no yog txhawm rau qhov qhov uas cov kws muaj peev xwm tuaj yeem so thiab kaw kab pong board uas qhov no tuaj yeem so. Koj cov xov hlau thiab cov arduino yuav raug muab zais thaum koj tso koj cov txuj ci rau hauv rooj plaub.

Nov yog daim duab kawg ntawm qhov nws yuav tsum zoo li:

Pom zoo: