Cov txheej txheem:

Kev Ua Si Nyeem Ntawv Ib Ntus Ntev: 7 Kauj Ruam
Kev Ua Si Nyeem Ntawv Ib Ntus Ntev: 7 Kauj Ruam

Video: Kev Ua Si Nyeem Ntawv Ib Ntus Ntev: 7 Kauj Ruam

Video: Kev Ua Si Nyeem Ntawv Ib Ntus Ntev: 7 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Kev Ua Si Nyeem Ntawv Ib Ntus Ntev
Kev Ua Si Nyeem Ntawv Ib Ntus Ntev

Tsim koj tus kheej Arduino-based Memorization Game!

Hauv qhov kev ua si no, ib qho RGB LED yuav nyem 3 xim xim thaum pib, koj yuav tsum nco ntsoov xim ntawm txhua tus. Saib qhov no mus qhov twg? Koj yuav siv lub zog ntsuas los hloov qhov RGB LED thib ob thiab nias lub pob kom sau txhua xim los ntawm thawj RGB LED. Qhov thib ob RGB LED yuav qhia koj yam xim twg koj tau xaiv, thiab ib zaug koj tau sau tseg qhov ua ntu zus RGB LEDs yuav yog lub teeb ntsuab thiab lub suab yuav ua si los ntawm lub suab nrov lub cim koj tau raug kwv yees ua ntu zus lossis ob qho tib si RGB LEDs yuav nyem liab thiab nws yuav rov pib ua ntu zus suav rov qab rau 3* (qhov no tuaj yeem hloov pauv). Koj pib qhov kev ua si nrog yuav tsum nco ntsoov 3 xim qhia, tom qab ntawd yog tias koj xaiv qhov xim kom raug, lwm qhov xim tsis raug yuav raug ntxiv ua ntu zus. Qhov no yuav txuas ntxiv mus txog thaum koj tau txais ib qho tsis raug, thiab zoo li tau hais los saum toj no nws yuav rov pib dua tsuas yog 3 xim.

Nws yog qhov lom zem tiag tiag, ua rau quav, thiab ua rau muaj kev ua si tsis zoo:)

YUAV UA LI CAS

  • 1 x Arduino UNO R3
  • 1 x Potentiometer
  • 1 x Laub Khawm
  • 2 x RGB LEDS
  • 8 x 220 Ohm Resistors
  • 1 x Piezo Speaker
  • 18 x Jumper Wires (Txiv neej rau Txiv neej)

XAUS

1 x Shield Board

Hauv daim duab saum toj no kuv tsim daim ntaub thaiv los qhia kuv cov phooj ywg tom tsev kawm ntawv, tab sis nws tsis tsim nyog kiag li. Yog tias koj xav mus rau txoj kev no koj yuav tau txais cov hlau txuas, qee qhov laug thiab ua siab ntev. Yog tias koj xav mus rau txoj kev no zoo siab xa xov rau kuv thiab kuv tuaj yeem pab koj yog tias koj muaj teeb meem.

Kauj Ruam 1: Ntxiv Cov Hluav Taws Xob Zoo/Hauv av rau Breadboard

Ntxiv Cov Ntawv Zoo/Hauv av rau Breadboard
Ntxiv Cov Ntawv Zoo/Hauv av rau Breadboard

Kauj ruam yooj yim heev

Txuas GND mus rau GND Rail ntawm daim ntawv qhia zaub mov

Txuas 5V mus rau POSITIVE Rail ntawm lub khob cij

Kauj ruam 2: Ntxiv Push Button

Ntxiv Push Button
Ntxiv Push Button

Muab lub laub khawm tso rau ntawm lub khob cij, thiab ua raws cov theem hauv daim duab saum toj no.

Txuas ib sab mus rau 5V txoj kev tsheb nqaj hlau

Txuas lub 220 Ohm resistor rau sab uas nyob ib sab ntawm lub laub khawm, tom qab ntawd txuas lub jumper mus rau GND

Txuas qhov kev tawm tsam mus rau 2 tus lej PIN ntawm Arduino

Tam sim no koj tau txais koj lub laub khawm ntxiv. Xyuas kom nws zoo nkaus li zoo li hauv daim duab, qhov no yog ib feem tseem ceeb ntawm qhov kev ua si no!

Kauj Ruam 3: Ntxiv Potentiometer

Ntxiv Potentiometer
Ntxiv Potentiometer

Muab lub hwjchim tso rau ntawm lub khob cij, thiab ua raws cov theem hauv daim duab saum toj no.

Txuas ib sab mus rau 5V txoj kev tsheb nqaj hlau

Txuas nruab nrab mus rau A0 Analog IN

Txuas sab kawg rau GND

Tam sim no koj tau txais koj lub laub khawm ntxiv. Xyuas kom nws zoo nkaus li zoo li hauv daim duab, qhov no yog ib feem tseem ceeb ntawm qhov kev ua si no!

NCO TSEG: Tsuav ib sab muaj 5V thiab lwm sab yog GND thiab nruab nrab mus rau A0, nws yuav ua haujlwm zoo

Kauj Ruam 4: Ntxiv Tus Hais Lus

Ntxiv Hais Lus
Ntxiv Hais Lus

Txuas sab GND mus rau txoj kev tsheb nqaj hlau GND

Txuas lub + sab rau 220 Ohm Resistor, tom qab ntawd txuas rau PIN 7

Qhov ntawd yog nws!

Kauj Ruam 5: Ntxiv Cov Neeg Siv Xaiv RGB

Ntxiv Cov Neeg Siv Xaiv RGB
Ntxiv Cov Neeg Siv Xaiv RGB

RGB LED's tuaj yeem yog txoj hlua tsis yooj yim, yog li saib cov duab ntawm cov lus qhia los txiav txim siab yog tias koj tau txais kev hloov pauv raug. Yog li, kuv cov kauj ruam hauv qab no yuav cuam tshuam nrog kuv kev sib hloov uas yog vim li cas nws thiaj tseem ceeb ua raws kuv cov kauj ruam raws nraim!

Pib los ntawm LEFT

Ntxiv 220-Ohm resistor rau thawj ob, hla qhov thib peb, thiab ntxiv rau qhov fouth

Txuas GND jumper mus rau tus thib 3 yam tsis muaj tus tiv thaiv, uas yog peb GND

Yog li nrog thawj tus tiv thaiv ntawm sab laug, nws mus rau PIN 3 (Xiav)

Tus tiv thaiv thib ob txuas rau PIN 5 (Ntsuab)

thiab tus tiv thaiv thib peb txuas rau PIN 6 (Liab)

Qhov ntawd yog nws! Nov yog RGB LED uas yuav siv rau tus neeg siv los xaiv cov xim raug!

Kauj Ruam 6: Ntxiv Random System RGB

Ntxiv Random System RGB
Ntxiv Random System RGB

RGB LED's tuaj yeem yog txoj hlua tsis yooj yim, yog li saib cov duab ntawm cov lus qhia los txiav txim siab yog tias koj tau txais kev hloov pauv raug. Yog li, kuv cov kauj ruam hauv qab no yuav cuam tshuam nrog kuv kev sib hloov uas yog vim li cas nws thiaj tseem ceeb ua raws kuv cov kauj ruam raws nraim!

Pib los ntawm LEFT

Ntxiv 220-Ohm resistor rau thawj ob, hla qhov thib peb, thiab ntxiv rau qhov fouth

Txuas tus GND jumper mus rau tus thib 3 yam tsis muaj tus tiv thaiv, qhov ntawd yog peb GND Yog li nrog thawj tus tiv thaiv ntawm sab laug, nws mus rau PIN 3 (Xiav) Tus tiv thaiv thib ob txuas rau PIN 5 (Ntsuab) Peb tus tiv thaiv txuas rau PIN 6 (Liab)

Qhov ntawd yog nws! Nov yog RGB LED uas yuav siv rau hauv kab ke los xaiv cov xim!

Kauj ruam 7: Koj Tiav lawm

Koj Tiav lawm!
Koj Tiav lawm!

Muaj lus nug dab tsi xav tau los xa ntawv tuaj rau kuv, Kuv tau txuas nrog Txoj Cai rau hauv cov kauj ruam no. Koj yuav tsum tsis tau hloov dab tsi los ua kom nws ua haujlwm, tab sis xav tias dawb rau tinker thiab ua kom txoj cai ua haujlwm du dua!

Txhua yam YUAV TSUM tau sau tseg zoo lossis cov cai uas piav qhia nws tus kheej, tab sis yog tias koj tshiab rau lub cajmeem thiab tsis nkag siab qee yam kuv teb rau E-mail sai dua!

Kuj tseem nyob ntawm no yog lub tsev qiv ntawv siv hauv qhov haujlwm

bitbucket.org/teckel12/arduino-new-tone/wiki/Home

Pom zoo: