Mundarija:

Arduino pleyerni birlikda boshqaradi: 7 qadam
Arduino pleyerni birlikda boshqaradi: 7 qadam

Video: Arduino pleyerni birlikda boshqaradi: 7 qadam

Video: Arduino pleyerni birlikda boshqaradi: 7 qadam
Video: Arduino Devre Tasarımı | 0 Dan Siparişe | MCU SERISI 2024, Noyabr
Anonim
Arduino pleyerni birlikda boshqaradi
Arduino pleyerni birlikda boshqaradi

Birlikdagi Arduino sensorli displeyi bilan bir vaqtda loyihani tanlab oldingiz. "Kislorod" loyihasi boshlanganda, bu juda qiyin. "Birlik" dagi o'yinchining so'zlari, voe o'yinchining so'zlari. Umuman olganda, bu juda katta muammo. Als deze waarde helemaal leeg - bu o‘yin o‘ynash. Bu erda LED lampalar mavjud, ular "kislorod" ga ega emas. Groen = goed, Blauw = gaat no, Rood = gevaarlijk.

O'yin nazorati:

  • Sensorli ekran:

    • Bog'lanuvchi kant van het scherm -> snelheid omlaag.
    • Rechter kant van het scherm -> snelheid omhoog.
  • Qoplama sensori:

    Klappen va kislorod o'lchagichlari

  • Muis:

    Kamera rond kijken

  • (qo'shimcha):

    A + D tafsilotlari: Qo'shimcha ma'lumot

Ta'minotlar

- 1 marta og'zaki mashinalar Klap sensori

- 1x LED chiroq (RGB)

- 1x sensorli ekran (2,8 dyuymli ILI9341 240x320 SPI TFT LCD displeyli sensorli panelli SPI ketma -ket portli modul)

- 1 marta Arduino Uno

1 -qadam: Ulanish: Klap sensori

Ulanish: Klap sensori
Ulanish: Klap sensori

- GND: In - (yer)

- PWR: de + (5v) da

- Chiqish: 2 -da (raqamli)

2 -qadam: ulanish: LED

Ulanish: LED
Ulanish: LED

- V (kuchlanish): de + (5v) da

- R: A0 + stendida (Rood, Rood, Bruin, Goud)

- B: A2 + stendida (R. R. B. G)

- G: A1 + stendida (R. R. B. G)

3 -qadam: Ulanish: sensorli ekran

Ulanish: sensorli ekran
Ulanish: sensorli ekran

- VCC: de + (5v) da

- GND: In - (yer)

- CS: 10 + stendda (Bruin, Zvart, apelsin, Goud)

- RESET: 8 + stendda (B. Z. O. G)

- shahar: 9 + stantsiyasida (B. Z. O. G)

- SDI MOSI: 11 + stendda (B. Z. O. G)

- SCK: 13 + stendda (B. Z. O. G)

- LED: de + (5v)

- SDO MISO: 12 da

- T_CLK: 3 + stendda (B. Z. O. G)

- T_CS: 4 + stendda (B. Z. O. G)

- T_DIN: 5 + stendda (B. Z. O. G)

- T_DO: 6 da

- T_IRQ: 7 + stendda (B. Z. O. G)

4 -qadam: Overzicht: Alles

Overzicht: Alles
Overzicht: Alles

Qoplama sensori:

- GND: In - (yer)

- PWR: de + (5v) da

- Chiqish: 2 -da (raqamli)

LED:

- V (kuchlanish): de + (5v) da

- R: A0 + stendida (Rood, Rood, Bruin, Goud)

- B: A2 + stendida (R. R. B. G)

- G: A1 + stendida (R. R. B. G)

Sensorli ekran:

- VCC: de + (5v) da

- GND: In - (yer)

- CS: 10 + stendda (Bruin, Zvart, apelsin, Goud)

- RESET: 8 + stendda (B. Z. O. G)

- shahar: 9 + stantsiyasida (B. Z. O. G)

- SDI MOSI: 11 + stendda (B. Z. O. G)

- SCK: 13 + stendda (B. Z. O. G)

- LED: de + (5v)

- SDO MISO: 12 da

- T_CLK: 3 + stendda (B. Z. O. G)

- T_CS: 4 + stendda (B. Z. O. G)

- T_DIN: 5 + stendda (B. Z. O. G)

- T_DO: 6 da

- T_IRQ: 7 + standa (B. Z. O. G)

5 -qadam: kod

Kutubxonalar:

- URTouch (https://www.rinkydinkelectronics.com/library.php?id=92)

- Adafruit_ILI9341

- Adafruit_GFX

6 -qadam: Birlikni o'rnatish

drive.google.com/open?id=1whpSVED7v-ocgt0IgCIx7Cu2EvHo6fHx (skriptlar)

1. Unity3D loyihasining asosiy maqsadi.

2. Asset ni yuklab oling: "Ardity" en importeer deze

2a: Boshqa xatolar: "Tahrirlash -> loyiha sozlamalari -> O'yinchi -> Boshqa sozlamalar -" "Api moslik darajasi" -> "NET 4.x"

3. Kamera uchun "CameraControl" skriptlari.

4. "PlayerController" skriptining eng yuqori pog'onasi - bu 3D kapsulasining eng muhim o'yinchisi.

5. De Ardity papkasida -> Prefabrika -> SerialController. Sahna/ierarxiyada uyqu buziladi

6. "ArduinoListener" skriptining bosh barmog'i bilan bo'sh o'yin yaratish.

7. Foydalanuvchi interfeysi panelini ochish kerak.

8. Pleyerda: "panelni o'chirish" va ArduinoListener "Tinglovchi"

9. O'yinchining ovozini "LookAt" belgisida ko'rsating: O'yinchini bo'sh holda yarating (bola o'yinchini o'ylab topgan bo'lsa) va uxlashni to'xtatib qo'ying. Voeg barmog'ini oyoq ostiga qo'ydi: "Maqsad"

10: SerialController "ArduinoListener" barmog'ining "Xabar tinglovchisi" bo'limida.

11. Maak een samolyot zodat de player ierop kan lopen.

12: Sluit de Arduino o'yinda.

Tavsiya: