Mundarija:
2025 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2025-01-13 06:58
Whack-a-Mole kabi o'yin.
LED va tugmachalardan foydalanish. 2 rejim mavjud: -Yagona o'yinchi-Ko'p o'yinchi
bitta o'yinchi rejimida 3 daraja mavjud: LEVEL_1: 1 soniya uchun 1 diod
LEVEL_2: 1 soniya uchun 2 ta diod
LEVEL_3: 2 diod 0,7 soniya davomida
Va ko'p o'yinchi qismi uchun bu juda oddiy 1 o'yinchi maqsadlarni beradi, ikkinchisi esa ularni uradi
Arduino -ni ulang, ketma -ket monitorni oching, bosqichlarni bajaring va zavqlaning
1 -qadam: 1 -qadam: Materiallarni olish
Ushbu loyiha uchun sizga kerak bo'ladi: 1. Arduino Uno
2. Ledlar
3. Simlar
4. PCB plitalarini lehimlash
5. Tugmalar
6. Rezistorlar
2 -qadam: Birinchi o'yinchi uchun taxtani tuzish
Komponentlardan foydalanib, rasmdagi kabi hamma narsani lehimlang (yoki prototip taxtasidan foydalaning). Ulanishlar: Led1-> Arduino pin 13.
Led2-> Arduino pin 12
Led3-> Arduino pin 11
Led4-> Arduino pin 10
Led5-> Arduino pin 9
Led6-> Arduino pin 8
Tugma1-> Arduino pin 7
Tugma1-> Arduino pin 6
Tugma1-> Arduino pin 5
Tugma1-> Arduino pin 4
Tugma1-> Arduino pin 3
Tugma1-> Arduino pin 2
3 -qadam: 2 -taxtani yasash
Ikkinchi taxtaning ulanishlari: Button1-> Arduino pin 14 (A0)
Tugma1-> Arduino pin 15 (A1)
Tugma1-> Arduino pin 16 (A2)
Tugma1-> Arduino pin 17 (A3)
Tugma1-> Arduino pin 18 (A4)
Tugma1-> Arduino pin 19 (A5)
4 -qadam: 4 -qadam: Kodni yuklang, o'rnating va o'ynang
Rejimni tanlang, darajani tanlang, hisobni kuting va tugmani bosing !!! Har tur 45 soniya davom etadi.
Qoidalar
1 -daraja: To'g'ri tugmani bosish = +10 ball
Noto'g'ri tugma bosildi = -5 ball
Yo'qotish tugmasi = -1 ball
2 -darajali, 3 -darajali
1 ta to'g'ri tugmani bosish = +15 ball
2 ta to'g'ri tugmachani bosish = +30 ball
Noto'g'ri tugmani bosish = -10 ball
1 tugmani o'tkazib yuborish = -1 ball