Cov txheej txheem:

Computer Engineering Kawg Simon Hais Game: 3 Kauj Ruam
Computer Engineering Kawg Simon Hais Game: 3 Kauj Ruam

Video: Computer Engineering Kawg Simon Hais Game: 3 Kauj Ruam

Video: Computer Engineering Kawg Simon Hais Game: 3 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
Computer Engineering Kawg Simon Hais Game
Computer Engineering Kawg Simon Hais Game

Kuv Lub Tswv Yim:

Kuv qhov haujlwm yog Simon Hais Game. Hauv qhov kev ua si no muaj plaub LED thiab plaub lub nyees khawm. Suab paj nruag yuav ua si los ntawm lub suab nrov thaum LED teeb pom kev sib txuam nrog cov nkauj. Tom qab ntawd qhov kev ua si yuav pib. Ib qho LED yuav ci thiab koj yuav tsum nyem lub pob kom sib haum nrog cov uas tau teeb tsa. Yog tias koj ua kom raug qhov LED yuav nyem thiab suab paj nruag yuav ua los ntawm lub tswb nrov thiab yog tias koj ua txhaum nws tsawg dua yuav nyem thiab cov nkauj sib txawv yuav ua los ntawm lub suab nrov. Qhov Game yuav rov pib dua thaum koj poob.

Kev tshawb fawb:

Kuv tau txais lub tswv yim los ntawm cov lus piav qhia txog "Arduino - Simon Simon Hais Game" ua los ntawm faziefazie. Hauv cov lus qhia nws ua Simon hais tias game zoo ib yam li kuv tshwj tsis yog nws siv RGB LED qhov kuv tsuas yog siv cov xim sib txawv LED vim tias kuv yuav tsis muaj tus pin txaus rau txhua tus rau RGB LED's. Kuv tau txais kuv cov cai los ntawm kev qhia sib txawv hu ua "Arduino Simon Says" ua los ntawm mpilchfamily. Nws kuj tseem ua Simon hais game tsuas yog nws siv Arduino version qub.

Kauj Ruam 1: Tau Txais Txhua Yam Khoom Xav Tau

Rau kuv simon hais tias game yog cov ntaub ntawv koj yuav xav tau.

-ua arduino

- daim ntawv qhia zaub mov

- 4 xim sib txawv LED's (yog tias koj tsis muaj 4 xim sib txawv koj tuaj yeem siv 2 qhov zoo ib yam, Kuv siv 2 ntsuab LED's.)

- 4 khawm

4, 360 ohm resistors

- lub suab nrov

- cov kab

Kauj ruam 2: Tsim Game

Tsim Lub Game
Tsim Lub Game
Tsim Lub Game
Tsim Lub Game
Tsim Lub Game
Tsim Lub Game
Tsim Lub Game
Tsim Lub Game

Kauj Ruam 1: Txhawm rau pib tsim koj yuav tsum tau muab koj 4 LEDS tso rau ntawm lub rooj mov ci hauv kab uas muaj qhov chaw zoo nyob nruab nrab ntawm lawv.

Kauj Ruam 2: Tom ntej no koj yuav xav muab koj 4 khawm nyob rau hauv qab txhua lub LED.

Kauj Ruam 3: Txuas cov xaim dub los ntawm luv luv ntawm LED's rau hauv av. Ua tib yam rau cov nyees khawm, txuas xov hlau los ntawm cov nyees khawm mus rau hauv av.

Kauj Ruam 4: Txuas 360 ohm resistors los ntawm cov ceg ntev ntawm LED mus rau sab xis ntawm LED ntawm lub khob cij.

Kauj Ruam 5: Txuas cov xov hlau los ntawm tus tiv thaiv mus rau Arduino thiab los ntawm cov nyees khawm mus rau Arduino. Cov pins yuav tsum yog nyob rau hauv qhov kev txiav txim no.

- Thawj LED rau tus pin 8 nrog lub pob rau tus pin 2

- LED thib ob rau tus pin 9 nrog khawm rau tus pin 3

- Thib peb LED rau tus pin 10 nrog khawm rau tus pin 4

- Plaub LED rau tus pin 11 nrog khawm rau tus pin 5

Kauj Ruam 6: Thaum kawg koj txuas koj lub suab nrov nrog ceg me txuas rau hauv av thiab ceg loj txuas rau tus pin 12.

Kauj ruam 3: Sketch

Kuv tau txais cov cai los ntawm "Arduino Simon Hais" ua los ntawm mpilchfamily. Txog qhov kos duab koj yuav tsum rub lub Tone lub tsev qiv ntawv los ua kom lub suab nrov ua haujlwm. Ntawm daim duab kom paub tseeb tias nws ua haujlwm koj yuav tsum hloov lub ledpin thiab khawm los ntawm Boolean mus rau int. Cov ntawv Sketch yog hauv qab rau koj rub tawm ntev nrog Tone tsev qiv ntawv.

Pom zoo: