Cov txheej txheem:

Automate Number Memory Game: 6 Kauj Ruam
Automate Number Memory Game: 6 Kauj Ruam

Video: Automate Number Memory Game: 6 Kauj Ruam

Video: Automate Number Memory Game: 6 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Kaum ib hlis
Anonim
Automate Number Memory Game
Automate Number Memory Game

Qhov no yog Memory game yog li ntawm thawj puag ncig yuav muaj ob tus lej kom koj nco qab thiab koj yuav muaj 5 vib nas this los ntaus tus lej twg tawm ua ntej ces tom ntej no yuav muaj 3 tus lej thiab koj yuav muaj 6 vib nas this los ntaus li ntawd txhua puag ncig koj yuav muaj tus lej nrog peb vib nas this ntxiv los sau cov lus teb thiab txhua puag ncig yuav ntxiv ib tus lej ntxiv tom qab koj xyaum txhua hnub koj lub cim xeeb yuav zoo dua.

Kauj ruam 1: Cov ntaub ntawv

LED *3

Keypad*1 Buzzer*1 Grove*18 Arduino resister (txiv kab ntxwv, dub, thiab xim av)*3 Arduino resister (xim av xiav thiab xim av)*1

Kauj ruam 2:

Duab
Duab

Ua ntej, peb tuaj yeem txuas tus lej tus tsiaj mus rau 2, -3, 4, -5, -6, 7, 8, -9 Muaj ob hom lej lej, ib ntawm lawv tsis muaj ABCD lwm tus muaj. Yog tias peb siv qhov uas tsis muaj ABCD yuav tsuas muaj 6 kab ces peb tuaj yeem txuas rau ~ 3, 4, ~ 5, ~ 6, 7, 8 ces qhov no yog txhua yam rau tus lej lej. Qhov thib ob LED Peb yuav siv 3 LED uas yog Ntsuab, Liab thiab Daj daj. Ntsuab yog rau thaum koj teb cov lus raug, Liab yog thaum koj teb tsis raug, Daj yog tos. Peb yuav txuas lawv mus rau 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 lossis 60 thiab tau xaiv ib qho ntawm lawv, Piv txwv li, yog tias kuv xaiv 35 ces kuv yuav xav siv 40 thiab 45 kuj thiab peb ntawm lawv yuav tsum xav tau txuas mus rau qhov tsis zoo ntawm cov khoom siv hluav taws xob ntawm lub khob cij, thiab ntawm sab xis lossis sab laug ntawm cov kab tsis zoo peb yuav tsum siv Arduino tiv taus (Txiv kab ntxwv, Dub, thiab Xim av) Thiab nyob rau hauv pem hauv ntej ntawm cov Arduino tiv taus, peb yuav siv kab txuas mus rau ~ 10, ~ 11, 12. Qhov kawg uas peb yuav siv yog tus hais lus. Tsuas yog muab tso rau txhua qhov chaw peb nyiam ces siv ib qho ntxiv Arduino tiv taus (Xim av, Xiav, thiab Xim av) tom qab ntawd siv ib kab ntxiv los txuas rau GND qhov no yog ib qho tseem ceeb tshaj plaws, yog tias peb plam qhov thaiv no txoj haujlwm yuav tsis ua haujlwm lossis peb tsis tuaj yeem rub tawm.

Kauj ruam 3: Programing

Cov kauj ruam tom ntej yog sau qhov program rau hauv Arduino program

Arduino Txoj Haujlwm:

create.arduino.cc/editor/john3904/185fb1a3…

Tau qhov twg los URL:

www.instructables.com/id/Arduino-Simple-Memory-Game/

Kauj Ruam 4: Arduino Program Piav Qhia

Hauv txoj haujlwm no, peb yuav siv ntau dua 300 kab ntawm txoj haujlwm qhov tseem ceeb tshaj plaws yog Timer, Keypad, Buzzer, LED, game parameter, thiab Game pin cov no yog qhov tseem ceeb tshaj plaws thaum lub sijhawm Arduino lub sijhawm no yog rau sijhawm txhua lub sijhawm koj twv lossis ntaus tus lej thaum lub sijhawm ua si. Tus pin game Yog ua tus lej tsis raug rau txhua puag ncig yog li qhov no yuav muaj kab ntau dua li lwm tus. Cov keypad yog rau tus lej xov tooj yog li peb tuaj yeem ntaus cov lus teb thiab xa mus rau lub khoos phis tawj no yog qhov tseem ceeb heev vim tias yog peb ua yuam kev ntawm qhov no yuav muaj zoo li 3 yam lus teb ua ntej yog lub sijhawm siab dua uas tau txais nws uas yog tus lej lej yuav tsis ua haujlwm, qhov thib ob yog tus lej koj ntaus yuav dhau los ua lwm tus lej piv txwv yog tias kuv ntaus 0 hauv pawg thawj coj saib nws yuav tawm 1 lossis 2 lossis tus lej tsis raug, qhov thib peb lub sijhawm yog nkag los ntawm nws tus kheej piv txwv li yog tias kuv nias * kom pib thiab qhov kev ua si yuav pib uas yuav ua rau tus lej lej tom qab ntawv pawg thawj coj yuav ntaus tus lej tsis raug mus ib txhis yog li saib xyuas ntau ntxiv ntawm ntu no. Thiab lub suab nrov yog qhia rau peb tias peb tau teb raug lossis tsis yog thiab peb tau nias tus lej lossis tsis yog li qhov no yog qhov muaj txiaj ntsig zoo tshaj plaws tsuas yog qhov peb yuav tsum tau saib xyuas yog kuv nws nws ua suab nrov yog lub suab sib txawv lossis tsis yog, Game parameter yog zoo li yuav luag zoo ib yam li tus pin game tab sis qhov no tau pab tag nrho lub tshuab ntau dua vim tias tus pin game tsuas yog rau tus pin tab sis qhov no yog rau yuav ua li cas tag nrho lub tshuab yuav mus. Qhov kawg thiab yog qhov yooj yim tshaj plaws txawm tias tus pib paub yuav ua li cas yog LED peb yuav xav tau Green ib qho uas yog ib qho los qhia rau neeg paub lawv qhov tseeb lwm qhov yog daj uas yog qhov qhia rau tib neeg qhov kev ua si raug tso tseg lossis tos, qhov kawg yog liab uas yog qhov qhia rau tib neeg tias lawv ua tsis yog. tom qab txhua qhov no peb tuaj yeem pib qhov kev ua si.

Kauj Ruam 5: Ua daim nplaub tshev kom pib qhov Game

Ok, yog li peb xav tau 4 daim ntawv rub tawm lossis tsim kom peb thiaj li tuaj yeem pib qhov kev ua si. Thawj qhov yog qhov yooj yim uas yog ib qho tswj hwm tag nrho Arduino program, thiab qhov thib ob yog qhov program qhia seb tus lej twg tawm los yog qhov tseeb uas tsis muaj dab tsi tab sis yog tias peb muab tso rau hauv lub sijhawm thiab tus lej 0 ~ 9 ces peb tsuas yog yuav tsum txuas mus rau Arduino dua li nws yuav muaj cov lej tsis raug thiab nws yuav dhau los ua ntau thiab ntau dua txhua qib, tab sis yuav txuas li cas? nyuaj heev ntawm cov kauj ruam no peb xav tau ob qho thiab muaj cov kauj ruam vim li cas nws thiaj yog ob qho thiab muaj? Kuv yuav teb tom qab thawj kauj ruam los txuas Arduino rau cov ntaub ntawv sab hauv cov ntaub ntawv yuav tsum muaj txhua yam hauv theem ob uas yog lub sijhawm thiab tus lej tom qab ntawd peb yuav tsum tau txais cov ntaub ntawv sab hauv peb tuaj yeem siv CMD los ua qhov thib ob no raws li tib yam li qhov kawg tab sis peb yuav tsum ua Arduino program ib qho hauv nws tom qab ntawd muab tag nrho cov ntaub ntawv thiab lub sijhawm thiab tus lej hauv ib daim nplaub tshev ces lub sijhawm thiab tus lej tuaj yeem pib ua haujlwm.

Kauj ruam 6: Yees duab

Tau qhov twg los URL:

Ua Tsaug Thanks for watching.

Pom zoo: