Cov txheej txheem:

Arduino Wire Game: 7 Kauj Ruam (nrog Duab)
Arduino Wire Game: 7 Kauj Ruam (nrog Duab)

Video: Arduino Wire Game: 7 Kauj Ruam (nrog Duab)

Video: Arduino Wire Game: 7 Kauj Ruam (nrog Duab)
Video: Wait what 😱 Flipper Zero 🐬 2024, Kaum ib hlis
Anonim
Image
Image
Ua Cov Hauv Paus
Ua Cov Hauv Paus

Txog qhov haujlwm no, Kuv tau hais los ntawm lub vev xaib no, thiab hloov nws los ua qhov haujlwm tshiab. Txoj haujlwm no hu ua Wire Game, qhov uas koj yuav siv tus kov hlau thiab ua kom nws hla mus yam tsis tau kov lub xov hlau. Yog tias tus kov kov cov hlau, lub suab nrov yuav nrov nrov, yog li qhov kev ua si no yuav sib tw yuav tsom mus thiab koj kev ruaj ntseg ntawm tes. Keeb kwm, qhov qub uas kuv tau hais los tsuas muaj lub suab nrov. Yog li ntawd, kuv tau ntxiv lub vaj huam sib luag LCD rau lub cuab yeej, uas yuav qhia rau cov neeg siv yuav ua li cas ua si game, thiab ua tiav-taw tes uas koj kov lub ntses taw tes, lub teeb pom kev zoo LED yuav ci tuaj, qhia tias koj yeej tau lawm!

Kauj Ruam 1: Sau Cov Khoom

- 1 Arduino Leonardo

- 1 Lub suab nrov

- 1 LED Teeb Pom Kev (txhua xim, nyiam dua ntsuab)

- 1 lub rooj tsav xwm LCD

- 1 pob ntawm txhuas hlau

- 4 pawg ntawm tooj liab xaim

- 4 tus nab kuab

- 1 lub thawv rau khoom (tsis tas yuav tsum tau)

- 1 tus cwj mem (tsis tas yuav tsum tau)

Kauj ruam 2: Code

Nyem qhov no mus rub cov cai

Kauj Ruam 3: Ua Cov Hluav Taws Xob

Ua Cov Hauv Paus
Ua Cov Hauv Paus
Ua Cov Hauv Paus
Ua Cov Hauv Paus
Ua Cov Hauv Paus
Ua Cov Hauv Paus

- Ua ntej, Txuas lub buzzer mus rau Arduino, Pin yog 9. (Saib duab 1)

Qhov thib ob, Txuas lub LCD Vaj Huam Sib Luag. Nco ntsoov tsis txhob txuas qhov tsis zoo rau qhov zoo thiab zoo rau qhov tsis zoo. (Saib duab 2)

- Thib peb, Txuas lub teeb ci LED. (Saib daim duab 3)

- Qhov kawg Circuit Court yuav tsum zoo li (duab 4)

Kauj Ruam 4: Ua Qhov Tseem Ceeb

Ua Qhov Tseem Ceeb
Ua Qhov Tseem Ceeb
Ua Qhov Tseem Ceeb
Ua Qhov Tseem Ceeb
Ua Qhov Tseem Ceeb
Ua Qhov Tseem Ceeb

Ua ntej tshaj, nqa koj cov ntawv txhuas hlau thiab txiav tawm 60 cm lossis loj npaum li cas koj xav kom koj cov xaim ua. Tom ntej no, hloov nws mus rau hauv cov duab zoo nkauj los tsim cov xaim. Tom qab ntawd, tshem tawm koj cov tooj liab tooj liab thiab qhwv nws ib ncig ntawm koj lub xov tooj cua aluminium swirly thiab xyuas kom tseeb tias koj tawm qee qhov tooj liab ntau dua, yog li cov xaim tuaj yeem siv hluav taws xob thaum tus nplaim kab zauv raug kaw rau ntawm cov xov hlau seem (Saib duab 1). Yog tias koj tsuas yog siv cov tooj tooj liab xwb, cov hlau yuav ua tau nyias dhau, yog li ntawd, nyuaj rau ua si nrog. Cov khoom tiav yuav tsum zoo li (saib duab 2) Tom ntej no, peb tab tom ua tus tuav. Txiav 20 cm tawm ntawm koj cov hlau txhuas thiab hloov nws mus rau hauv tus nuv. Ua zoo ib yam li ua ntej, qhwv cov hlau tooj liab nyob ib puag ncig ntawm tus hlau nuv ntses, thiab tseem tso qhov seem 30 cm ntawm tooj liab xaim (Saib daim duab 3). Thiab rov ua qhov qhwv ob zaug, yog li koj yuav tsum muaj ob txoj hlua tooj liab ntev dai (Saib daim duab 4). Tom ntej no, nqa lub tog raj kheej nrog lub qhov nyob hauv qhov no, hauv qhov no, Kuv tau siv qhov uas koj tuav tus cwj mem. Tom ntej no nqa cov tooj tooj liab thiab qhwv nws ib ncig ntawm lub tog raj kheej thiab xyuas kom tseeb tias muaj cov hlau xaim dai ntawm qhov khoom, ib yam li tus tuav (Saib duab 5). Tom qab ntawd, coj cov xov hlau swirly thiab tso nws hla koj lub tog raj kheej tooj liab khoom (Saib duab 6).

Kauj Ruam 5: Txuas Lub Circuit Court rau Cov Khoom

Txuas lub Circuit Court rau cov khoom
Txuas lub Circuit Court rau cov khoom
Txuas lub Circuit Court rau cov khoom
Txuas lub Circuit Court rau cov khoom
Txuas lub Circuit Court rau cov khoom
Txuas lub Circuit Court rau cov khoom

Ua ntej tshaj, txuas ib qho ntawm tus zauv tus zauv kab (saib daim duab 3) mus rau txoj hlua dai ntawm cov xov hlau tseem ceeb thiab lwm qhov txuas mus rau xaim ntawm tus kov (saib duab 1). Tom ntej txuas ib qho ntawm cov teeb pom kev zoo LED coj mus rau txoj hlua dai ntawm lub xov hlau tseem ceeb thiab lwm qhov txuas mus rau xaim hlau ntawm tus kov (Saib duab 2).

Kauj Ruam 6: Ua tiav Cov Khoom

Tiav Cov Khoom
Tiav Cov Khoom

Tam sim no koj tuaj yeem xaiv los npog thiab kho koj cov khoom lossis tsuas yog tso nws nyob ntawd, qhov no kuv siv lub thawv rau khoom los dai kuv Arduino (Saib duab 1).

Kauj ruam 7: Ua tiav

Koj Ua Tiav !!!, koj tuaj yeem tshawb xyuas kuv cov khoom kawg hauv kuv daim vis dis aus. Yog tias koj ua nws, thov koj xav qhia rau kuv hauv cov lus.

Pom zoo: