Cov txheej txheem:
Video: "Ninja Dollar" Game rau Arduino: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Lwm qhov vis dis aus game rau arduino.it yog qhov kev ua si zoo tshaj plaws tshaj li qhov kuv tshaj tawm zaum kawg. Vim li cas nws thiaj li nyuaj dua li lwm yam? Nws nyuaj dua vim tias qhov no tuaj yeem dhia thiab tua thiab muaj lub suab nrov thiab cov ntsiab lus tshiab txuas ntxiv.
Khoom siv
- Arduino.
- Cov qhob cij
- jumper cov xov hlau
- Liab LED
- 2 cov nyees khawm
- 2 10k ohm resistors
- 2 220R resistors.
- Super ci Blue LED.
- piezo buzzer: cov
- 16*2 LCD zaub
Kauj Ruam 1: Txuas Txhua Yam Ua Ke
Tam sim no koj yuav tsum xaim txhua yam
Kauj Ruam 2: Yuav Ua Li Cas:
- Qhib lub arduino.
- LCD yuav tsum luam tawm: "qhov kev ua si pib hauv" thiab suav rov qab.
- Nias ib qho ntawm cov nyees khawm kom dhia thiab lwm yam los tua.
- txhua qhov thaiv uas koj dhia koj yeej ib lub ntsiab lus thiab txhua * uas koj ntes tau muab rau koj 5 cov ntsiab lus.
- Thaum koj muaj 50 cov ntsiab lus lossis siab dua koj yeej
Kauj Ruam 3: Txoj Cai
// este jogo e muito interessante e ao mesmo tempo irritante e frustante mas muito divertido.
#suav nrog
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
const int buttonPin1 = 1; const int buttonPin2 = 6; const int buzzer = 7; unsigned ntev pts = 0; // teeb tsa buttonstates bool buttonState1 = 0; bool buttonState2 = 0; // random tus lej rau txoj haujlwm ntawm cov teeb meem int randomNums [6]; // random tus lej rau tus naj npawb ntawm cov teeb meem int randomNum = 0; // random tus lej rau txoj haujlwm ntawm pts int randomNums1 [3]; // random tus lej rau tus lej pts int randomNum1 = 0; // pib ncua sijhawm, uas txo qis maj mam kos npe rau myDelay = 500; // ua qhov boolean no txhawm rau txheeb xyuas yog tias khawm 2 raug nias vim tias yog nws tau nias ib zaug hauv thawj zaug rau lub voj kuv xav tau teeb meem tsis txhob sau kom txog thaum kawg ntawm nws bool temp = 0; // qhov sib txawv no khaws cov haujlwm ntawm tus tub rog thaum nws tua. tuaj yeem muaj 16 txoj haujlwm vim tias tus tub rog muaj 16 txoj haujlwm. koj tempI [16]; // Kuv siv cov boolean no los xyuas yog tias lub ntsiab lus raug catched bool temp1 = 0;
// siv qhov sib txawv no los khaws txoj haujlwm ntawm lub ntsiab lus. nws yuav tsum yog thiab khaws cia txoj haujlwm ntawm txhua lub ntsiab lus hauv ib qho rov ua dua ntawm thawj rau lub voj. yog tias nws khaws cia tsuas yog ib txoj haujlwm, tom qab ntawv "qub" yuav rov qab los hauv qhov rov ua dua tshiab
koj tempI1 [3]; // siv qhov sib txawv no kom muaj tus lej txhaj tshuaj ntawm tus tub rog, uas tseem yog qhov ntev ntawm ib qho array tempI int button2IsPressed = 0; LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
void teeb tsa () {
// teeb tsa LCD tus lej ntawm kab thiab kab: lcd.begin (16, 2); // teeb tsa hom khawm hom pinMode (buttonPin1, INPUT); pinMode (buttonPin2, INPUT); tus pinMode (buzzer, OUTPUT); lcd.setCursor (4, 0); lcd.print ("THE GAME"); lcd.setCursor (2, 1); lcd.print ("STARTS IN"); lcd.print ("5"); ncua (1000); lcd.setCursor (12, 1); lcd.print ("4"); ncua (1000); lcd.setCursor (12, 1); lcd.print ("3"); ncua (1000); lcd.setCursor (12, 1); lcd.print ("2"); ncua (1000); lcd.setCursor (12, 1); lcd.print ("1"); ncua (1000); lcd.clear ();
}
void voj () {
ntawm no:
randomNum = random (5);
rau (int i = 0; i9 && pts19 && pts29 && pts = 50) {pts = 0; myDelay = 500; lcd.clear (); lcd.setCursor (5, 0); lcd.print ("VICTORY"); suab (buzzer, 262); ncua (200); suab nrov (buzzer, 330); ncua (200); suab nrov (buzzer, 392); ncua (100); suab nrov (buzzer, 330); ncua (100); suab nrov (buzzer, 392); ncua (100); suab nrov (buzzer, 523); ncua (200); noTone (buzzer); ncua (3000); lcd.clear (); tuaj ntawm no; } lwm tus lcd.setCursor (15, 0); lcd.print (pts); buttonState1 = digitalRead (buttonPin1); buttonState2 = digitalRead (buttonPin2); // teeb tsa teeb meem yog tias tus tub rog tsis tua lossis nws tua tab sis nws tseem dhia yog (! temp) {rau (int j = 0; jrandomNums [j]) {lcd.setCursor (randomNums [j], 1); lcd.print ("#"); }
}
}
// teeb tsa pts
yog (! temp1) {rau (int j = 0; j
}
Pom zoo:
Arduino Rhythm Game Controller (rau Kuv Tus Kheej Game): 6 Kauj Ruam
Arduino Rhythm Game Controller (rau Kuv Tus Kheej Game): Hauv cov lus qhia no kuv yuav qhia koj li cas kuv tsim qhov Rhythm Game Controller los ntawm kos. Nws cuam tshuam nrog kev txawj ntoo ntoo yooj yim, kev txawj 3D luam ntawv yooj yim thiab cov txuj ci yooj yim soldering. Koj tuaj yeem zaum tsim txoj haujlwm no ua tiav yog tias koj muaj xoom ex
Kawm Ib Qho Kev Ua Yeeb Yam Yooj Yim ntawm SOLIDWORKS: Ua Rau Rau Rau Ib Sab Ncig: 22 Kauj Ruam
Kawm Ib Qho Kev Ua Yeeb Yam Yooj Yim ntawm SOLIDWORKS: Ua Rau Rau Rau Rau Ib Sab: Cov Lus Qhia no yuav taug koj cov hauv kev uas yuav tsum tau ua kom ua qauv 3D ntawm rau rau sab ib sab. Cov duab 3D, thiab cov fab sab hauv thiab sab nrauv lossis cov qauv 3D.Thaum ua haujlwm
Txaus Siab Rau Koj Tus Kheej Tsuas Yog Siv 12V-rau-AC-kab Inverter rau LED Lub Teeb Hluav Taws Xob Tsis txhob Rov Ua Rau Lawv rau 12V.: 3 Cov Kauj Ruam
Txaus Siab Rau Koj Tus Kheej Tsuas Yog Siv 12V-rau-AC-kab Inverter rau LED Lub Teeb Hluav Taws Xob Tsis txhob Rewiring Lawv rau 12V: Kuv txoj kev npaj tau yooj yim. Kuv xav txiav cov phab ntsa uas siv hluav taws xob LED teeb ua ib daim ces rov txuas nws kom khiav tawm 12 volts. Lwm txoj hauv kev yog siv lub zog hloov pauv, tab sis peb txhua tus paub tias lawv tsis muaj txiaj ntsig zoo, puas yog? Txoj cai? Los yog lawv?
Ntxiv Pc Sync Jack rau Nikon Sc-28 Ttl Cable (siv Auto Settings rau lub Koob Yees Duab Flash thiab Ua Rau Lub Koob Yees Duab Tawm !!): 4 Kauj Ruam
Ntxiv Pc Sync Jack rau Nikon Sc-28 Ttl Cable (siv Auto Settings rau ntawm Lub Koob Yees Duab Flash thiab Ua Rau Lub Koob Yees Duab Tawm Tsam !!): Hauv cov lus qhia no kuv yuav qhia koj yuav tshem tawm ib qho ntawm cov khoom ntiag tug 3pin TTL txuas txuas ntawm ib sab ntawm Nikon SC-28 tawm lub koob yees duab TTL cable thiab hloov nws nrog tus qauv PC txuas txuas. qhov no yuav tso cai rau koj siv lub siab nyem, s
12v rau USB Adapter 12v rau 5v Transformer (zoo rau Tsheb): 6 Cov Kauj Ruam
12v rau USB Adapter 12v rau 5v Transformer (zoo rau Tsheb): Qhov no yuav qhia koj yuav ua li cas thiaj ua tau 12v rau USB (5v) adapter. Qhov pom tseeb tshaj plaws ntawm qhov no yog rau 12v lub tsheb hloov pauv, tab sis txhua qhov chaw koj muaj 12v koj tuaj yeem siv nws! Yog tias koj xav tau 5v rau lwm yam uas tsis yog USB, tsuas yog hla cov kauj ruam hais txog kev ntxiv USB chaw nres nkoj