Cov txheej txheem:

Arduino Pocket Game Console + A -Maze - Maze Game: 6 Cov Kauj Ruam (nrog Duab)
Arduino Pocket Game Console + A -Maze - Maze Game: 6 Cov Kauj Ruam (nrog Duab)

Video: Arduino Pocket Game Console + A -Maze - Maze Game: 6 Cov Kauj Ruam (nrog Duab)

Video: Arduino Pocket Game Console + A -Maze - Maze Game: 6 Cov Kauj Ruam (nrog Duab)
Video: Arduboy - самая маленькая консоль 🎮 #retrogaming #gameboy #игры #8bit #16bit #arduboy #arduino 2024, Hlis ntuj nqeg
Anonim
Arduino Pocket Game Console + A -Maze - Maze Game
Arduino Pocket Game Console + A -Maze - Maze Game

Txais tos rau kuv thawj qhov kev qhia

Txoj haujlwm kuv xav qhia rau koj hnub no yog Arduino tshawb nrhiav game, uas dhau los ua lub hnab ntim khoom muaj peev xwm zoo li Arduboy thiab zoo ib yam li Arduino raws cov khoom siv. Nws tuaj yeem ua rau pom nrog kuv (lossis koj) kev ua si yav tom ntej ua tsaug rau nthuav tawm ICSP header.

Kuv muaj lub tswv yim ob peb lub hlis dhau los los tsim kev ua si tshawb ntawm Arduino, tab sis tsis muaj qhov nyuaj-coded txheej mazes. Nws yuav tsum muaj peev xwm tsim qhov tshawb nrhiav tshiab rau txhua qib koj tab tom ua si, yog li koj yuav tsis pom qhov tshawb nrhiav qub ib zaug ntxiv:)

Coding qhov no yog qhov nyuaj me ntsis, txij li Arduino txwv hauv RAM cim xeeb, thiab tom qab ntawd kuv pom ob peb yam piv txwv qhov no tuaj yeem ua tiav nrog Bo-Taoshi algorithm yooj yim.

Txoj Cai Kuv siv los ua qhov pib uas kuv coj los ntawm SANUKI UDON thiab nws txoj haujlwm YUAV UA LI CAS YUAV UA LI CAS UA HAUJ LWM ZOO TSHAJ PLAWS

Kauj Ruam 1: Breadboard Prototyping

Breadboard Prototyping
Breadboard Prototyping
Breadboard Prototyping
Breadboard Prototyping

Kuv pib taw tes yog nrog lub khob cij me me nrog tsuas yog 4 khawm txuas los ntawm kev tshawb nrhiav, tab sis tom qab thaum kuv txiav txim siab nws yuav tsum yog game game kuv ntxiv ob peb lub khawm ntxiv. Ntawm lub khob cij loj dua koj tuaj yeem pom 2 khawm ntxiv, thiab tom qab ntawd kuv tau ntxiv ib qho thib peb los siv ua pib/ncua/khawm ntawv qhia zaub mov

Kauj Ruam 2: Qhov Yuav Tsum Tau

  • Arduino pro mini / Arduino Uno / Atmega328P nti
  • 28 tus pin DIP qhov (xaiv tau)
  • SSD1306 OLED zaub
  • Piezo hais lus
  • Laub khawm - 7 daim
  • Cov npib ntawm tes tuav cov roj teeb
  • Toggle hloov
  • Hlau
  • Tsab ntawv pcb (60x40mm)

Kauj Ruam 3: Daim phiaj Breadboard / Schematic

Daim phiaj thaiv kab hlau rhuav / Schematic
Daim phiaj thaiv kab hlau rhuav / Schematic
Daim phiaj thaiv kab hlau rhuav / Schematic
Daim phiaj thaiv kab hlau rhuav / Schematic
Daim phiaj thaiv kab hlau rhuav / Schematic
Daim phiaj thaiv kab hlau rhuav / Schematic

Txuas cov khoom siv raws li qhia hauv daim duab saum toj no.

Nyees khawm:

  • UP khawm: Arduino tus pin 7
  • DOWN khawm: Arduino tus pin 6
  • LEFT khawm: Arduino tus pin 9
  • Txoj cai khawm: Arduino tus pin 8
  • Ib lub pob: Arduino tus pin 5
  • B khawm: Arduino tus pin 4
  • Pib khawm: Arduino tus pin 2

SSD1306 OLED npo:

  • SCL: Arduino tus pin A5
  • SDA: Arduino tus pin A4
  • VCC: Arduino VCC
  • GND: Arduino GND

Buzzer:

  • Buzzer zoo: Arduino tus pin 3
  • Buzzer av: Arduino GND

Kauj ruam 4: Source Code

A-Maze game qhov chaws tuaj yeem pom ntawm no:

Qhib hauv Arduino IDE thiab xa mus rau koj lub rooj tsav khoom lossis siv ISP programmer los teeb tsa koj lub nti.

Kuv pom zoo siv USBTIny ISP, tsis muaj teeb meem nrog nws:) tab sis koj kuj tseem tuaj yeem siv Arduino zoo ib yam los teeb tsa koj lub nti.

Hauv kuv qhov xwm txheej kuv tsis tau siv sab nrauv, yog li kuv Atmega328p nti ua haujlwm ntawm sab hauv oscillator uas yog 8MhZ.

Yog xav paub ntxiv mus ntsib qhov txuas no:

Kauj Ruam 5: Pom Nws Hauv Kev Ua

Image
Image

Kauj Ruam 6: Case thiab Miniaturization

Case thiab Miniaturization
Case thiab Miniaturization
Case thiab Miniaturization
Case thiab Miniaturization

Yog tias koj xav ua txoj haujlwm no mus tas li, nrog cov ntaub ntawv zoo, ntawm no yog cov ntaub ntawv yooj yim 3D luam tawm uas kuv tau tsim:

Hauv cov duab saum toj no koj tuaj yeem pom yuav ua li cas txhua lub Cheebtsam tau muab tso rau ntawm 4x6 tus qauv PCB.

Feem ntau cov khawm txuas mus rau hauv qab cov neeg tuav lub roj teeb, sim ua kom yooj yim li sai tau, yog li cov neeg tuav lub roj teeb tuaj yeem muaj cov dej ntws zoo sib xws saum lub rooj tsavxwm nrog cov xov hlau sib txuas.

Kuv kuj pom zoo ua lwm txoj hlua nyob hauv qab lub vijtsam, txij li Atmega nti txhais ceg tau muag thiab nthuav tawm hauv qab lub vijtsam. Thaum koj tau ua tiav cov kab laug sab, muab qee daim kab xev rwb thaiv hauv qab lub vijtsam los tiv thaiv luv luv thiab lwm yam.

ICSP lub taub hau yog nyob ntawm yeem, thiab yog tias koj txiav txim siab tsis nthuav tawm nws, nws yuav ua rau koj sib dhos yooj yim dua, 6 kev sib txuas tsawg dua los saib xyuas, tab sis teeb tsa lub nti ua ntej ua ntej koj muab nws tso rau, lossis siv 28 tus pin DIP qhov yog li koj tuaj yeem yooj yim tshem tawm cov nti rau lub cajmeem.

Pocket-Sized Contest
Pocket-Sized Contest
Pocket-Sized Contest
Pocket-Sized Contest

Khiav Tawm Hauv Kev Sib Tw Hnab Hnab Me Me

Pom zoo: