Cov txheej txheem:

Daim Npav Ua Lag Luam/Game Console: ATtiny85 thiab OLED Screen: 5 Kauj Ruam (nrog Duab)
Daim Npav Ua Lag Luam/Game Console: ATtiny85 thiab OLED Screen: 5 Kauj Ruam (nrog Duab)

Video: Daim Npav Ua Lag Luam/Game Console: ATtiny85 thiab OLED Screen: 5 Kauj Ruam (nrog Duab)

Video: Daim Npav Ua Lag Luam/Game Console: ATtiny85 thiab OLED Screen: 5 Kauj Ruam (nrog Duab)
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Image
Image
Lub Siab
Lub Siab

Nyob zoo sawv daws

Hnub no kuv yuav qhia koj li cas koj tuaj yeem tsim koj tus kheej daim npav ua lag luam/game console/xijpeem koj tuaj yeem xav txog tias muaj lub ntsej muag rov qab I2C OLED zaub thiab ATtiny85 Microprocessor. Hauv Cov Lus Qhia Kuv yuav qhia koj li cas PCB uas kuv tau tsim los ua haujlwm tau zoo, koj tuaj yeem tsim nws li cas, thiab koj tuaj yeem ua dab tsi nrog txoj haujlwm no. Yog tias koj twb muaj I2C screen txuas rau ATtiny85, Cov Lus Qhia no tseem tuaj yeem pab tau yog tias koj tab tom sim kom tau cov duab los tso saib lossis xav ua cov ntawv qhia zaub mov, game, thiab ntau ntxiv.

Koj yuav xav tsis thoob tias qhov khoom no yog dab tsi tiag. Nws tsuas yog qhov yooj yim luam tawm pawg thawj coj saib nrog lub roj teeb hauv onboard, tshuaj ntsuam, nyees khawm, on/off hloov, thiab chav ua haujlwm. Xav txog nws li Gameboy me me, uas koj tuaj yeem yooj yim program ua ntau yam. Ntxiv mus!

Kauj Ruam 1: Lub Siab

Lub Siab
Lub Siab
Lub Siab
Lub Siab

Yog tias koj tseem tsis tau muaj, kuv xav kom koj ua tus lej ntawm circuits.io. Qhov no yuav tso cai rau koj los kho kuv tus qauv kom haum rau koj cov kev xav tau.

Hauv qib no kuv yuav piav qhia tias koj tuaj yeem tau txais koj txhais tes ntawm ib qho ntawm cov ntawv luam tawm Circuit Board (PCBs) li cas. Kuv tau ua kuv PCB hauv circuits.io, cov cuab yeej online zoo uas koj tuaj yeem siv los tsim cov phiaj xwm hluav taws xob thiab PCBs. Koj tuaj yeem pom tus tsim ntawm no:

Yog tias koj xav tau txais PCB, koj tuaj yeem xaj ntau npaum li koj xav tau los ntawm OSH Park siv qhov txuas no:

Nws siv sijhawm me ntsis kom tau txais cov laug cam (1-3 lub lis piam), tab sis ntseeg kuv. Nws tsim nyog nws! Koj yuav xav tau cov hauv qab no los tsim koj tus kheej daim npav ua haujlwm ntau:

  • ATtiny85 hauv SOIC-8 pob. Nov yog lub hlwb ntawm peb txoj haujlwm uas tswj hwm txhua yam.
  • I2C 128x64 pixel OLED Screen:
  • 2 22k ohm resistors. Cov no yog rub tawm resistors rau cov nyees khawm.
  • Nto-Mount CR2032 Holder:
  • CR2032 Npib Cell Roj Teeb. Lub roj teeb me me no tuaj yeem siv hluav taws xob rau qee lub sijhawm.
  • 3-tus pin swb hloov. Nov yog lub zog hloov pauv!
  • Poj Niam Headers. Koj tuaj yeem siv cov no los ua haujlwm ATtiny85 thaum nws nyob hauv Circuit Court!
  • 6mm cov nyees khawm:
  • Ib daim ntawv luam tawm Circuit Board (koj tuaj yeem xaj nws siv qhov txuas saum toj no

Cov Cuab Yeej:

  • Soldering hlau (nrog cov lus qhia zoo)
  • Solder
  • Ua clippers

Rau kev ua haujlwm ntawm ATtiny85:

  • 6 Txiv neej rau txiv neej jumper xov hlau
  • Ib qho 10 micro-farad capacitor
  • Arduino Uno lossis qee qhov ATmega-based microcontroller

Kauj Ruam 2: Sib dhos PCB

Sib dhos PCB
Sib dhos PCB
Sib dhos PCB
Sib dhos PCB

Qhov no yog qhov yooj yim zoo nkauj tiag tiag. Txhua yam koj yuav tsum tau ua yog ua kom tag nrho cov khoom siv rau lawv qhov chaw, raws li qhia hauv lub rooj tsavxwm. Qee qhov ntawm OLED cov ntxaij vab tshaus tuaj hauv ntau qhov sib txawv, yog li yog koj li loj dhau rau lub rooj tsavxwm, koj tuaj yeem muaj nws dai saum toj ib yam li hauv daim duab saum toj no, thiab khoov hla lub taub hau ntawm lwm sab thiab muab lawv tso rau qhov qhov uas lawv yuav tsum mus. Saib daim duab thib ob yog tias koj tsis meej pem.

Ob peb lub tswv yim pab:

  • Qhov me me ntawm ATtiny yuav tsum tau taw qhia kom nws nyob ze rau qhov swb hloov, txwv tsis pub koj yuav muaj tus pin nyob hauv qhov kev txiav txim tsis raug.
  • Kev taw qhia ntawm tus tuav lub roj teeb tseem ceeb. Qhov kawg ntawm tus tuav nrog cov ntawv ntxiv-ntxiv rau yuav tsum tau nyob hauv qab ncoo (taw qhia rau tus tiv thaiv).
  • Kev taw qhia ntawm cov hloov pauv, cov nyees khawm, lub taub hau, thiab cov tiv thaiv tsis muaj teeb meem

Yog tias koj muaj lus nug, thov email rau kuv ntawm info [ntawm] coniferapps.com

Kauj Ruam 3: Sijhawm Tau Txais Txoj Haujlwm

Kuv tau txais kuv ATtiny/screen combo ua haujlwm siv cov lus qhia hauv qab no: https://www.instructables.com/id/ATTiny85-connects-to-I2C-OLED-display-Great-Things/. Qhov tseeb, kuv txawm siv lub tsev qiv ntawv uas AndyB2 hloov kho hauv kuv tus kheej cov duab.

Txoj hauv kev peb tab tom yuav tsim lub ATtiny yog los ntawm Arduino Uno. Cov Lus Qhia hauv qab no qhia koj yuav ua li cas: https://www.instructables.com/id/Program-an-ATtiny-with-Arduino/. Yog tias koj tsis tau pom dua, txhua tus xav tau tus pin tau pab tawm ntawm PCB nrog tus lej tus lej cim rau sab nraub qaum.

Yog tias koj xav pib nrog qhov piv txwv yooj yim, rub cov duab kos txuas rau saum koj daim npav. Nco ntsoov tias lub zog hloov pauv mus rau sab xis ua ntej koj ua qhov no. Koj tsis xav kom muaj roj teeb thiab Uno ob qho tib si muab hluav taws xob rau tib lub sijhawm! Hauv phau ntawv ntawd yog ib pawg ntawm cov ntaub ntawv. Kuv yuav tham txog qhov no ntau ntxiv hauv cov kauj ruam tom ntej, tab sis feem ntau ntawm cov ntaub ntawv header hauv muaj hexadecimal sawv cev ntawm cov duab monochromatic bitmap. Cov ntaub ntawv.bmp yog cov duab no uas kuv nyuam qhuav hais - raws li koj tuaj yeem pom, lawv yog xim dub thiab dawb thiab raws nraim 128x64 pixels. Cov no tsis tau tshaj tawm rau lub microcontroller, tab sis kuv xav tias kuv yuav suav nrog lawv rau kev siv.

Kauj Ruam 4: Txog Qhov Kev Pabcuam Nws Tus Kheej

Cov duab kos kuv tau muab koj tso rau hauv cov kauj ruam dhau los yog tus piv txwv yooj yim ntawm yuav ua li cas koj tuaj yeem siv cov ntawv qhia zaub mov. Raws li koj nyem rau txhua tus khawm sab laug thiab sab xis, nws toggles lub txee hauv qhov haujlwm. Ib txoj haujlwm yog hu ua uas muaj ATtiny txheeb xyuas lub xeev ntawm lub txee no, thiab raws li tus lej ntawm tus lej ATtiny kos cov duab ntawm cov ntawv xaiv uas tau xaiv tam sim no ntawm qhov screen. Txhua qhov sib txawv xaiv cov ntawv qhia zaub mov-hlwb yog nws tus kheej duab. Yog tias khawm sab saum toj raug nias, ATtiny rov tshuaj xyuas lub xeev ntawm lub txee kom txiav txim siab seb yuav tshuaj ntsuam kom ntxaws li cas. Thaum cov ntxaij vab tshaus nthuav dav no tau nthuav tawm ATtiny tau tshuaj xyuas tas li kom pom tias muaj ib lub pob nyem. Thaum nws pom lub pob nyem, lub luag haujlwm uas kos cov ntawv qhia zaub mov yog hu dua thiab lub xeev tam sim no ntawm cov ntawv qhia zaub mov tau kos rau ntawm lub vijtsam, coj peb rov qab mus rau hauv cov ntawv qhia zaub mov. Nws suab me ntsis txaus ntshai yog tias koj tshiab rau lub cajmeem, tab sis kuv cog lus rau koj ib zaug koj saib cov cai nws yuav ua rau nkag siab ntau dua.

Txhua ntawm cov ntxaij vab tshaus nthuav dav kuj yog nws tus kheej duab.

Yog tias koj tsis tau pom dua, qhov kev xaiv tsis txaus siab tsis ua dab tsi. Peb yuav mus txog qhov no hauv cov kauj ruam tom ntej:).

Kauj ruam 5: Customizing Koj Tsim

Tam sim no koj tau pom dab tsi kuv tau ua, nws yog lub sijhawm rau koj los kho daim npav nrog koj tus kheej cov ntaub ntawv. Lub tsev qiv ntawv ntawd kuv suav nrog muaj lub luag haujlwm los kos cov ntawv ntawm lub vijtsam, tab sis kuv pom zoo kom koj mus nrog kev nruj me ntsis raws cov duab, raws li nws zoo li zoo li ntau. Kuv yog thawj tus yuav ntxiv cov duab rau hauv qhov haujlwm ntawm cov lus qhia no, tab sis nws ntev txaus los lav nws tus kheej cov lus qhia. Koj tuaj yeem pom nws ntawm no:

Tam sim no koj paub yuav ua li cas ntxiv cov duab, muaj ntau yam uas koj tuaj yeem ua daim npav ua. Koj tuaj yeem siv kuv cov ntawv qhia zaub mov thiab pab tshuaj ntsuam, thiab tsuas yog ntxiv rau koj tus kheej cov ntaub ntawv tiv toj. Koj tuaj yeem ua qhov kev ua si me me rau qhov "xav tsis thoob" xaiv. Nws yuav yooj yim yooj yim txav me me 10x10 sprite ncig lub vijtsam siv cov nyees khawm thiab tshawb xyuas yog tias nws sib tsoo nrog lwm tus sprite. Koj tuaj yeem ua tus flappy noog clone siv tib lub tswv yim no! Yog tias koj ua qee yam, thov tso daim duab/yees duab/ntawv ntawm nws hauv cov lus!

Tsuas yog ib qho me me ntxiv kuv tsis nco qab hais txog. Raws li kev khaws cia mus, ATtiny85 tsis muaj ntau ntawm nws. Rau cov khoos kas, nws yog txog 8kb. Kuv daim duab tam sim no nrog 5 daim duab thiab OLED lub tsev qiv ntawv tso saib txog 7 ntawm cov 8kb. Txhua qhov kev ua si uas koj ua yuav tsum tau haum rau hauv qhov me me no, yog li nws yuav yog kev sib tw lom zem:).

Ua tsaug rau mloog kuv ramble rau, thiab yog tias koj muaj lus nug tsis txhob yig tau email rau kuv ntawm cov ntaub ntawv [ntawm] coniferapps.com (hloov [ntawm] nrog @). Thov pov npav rau kuv hauv kev sib tw Autodesk Circuits! Vam tias koj yuav muaj koj tus kheej daim npav/game sai sai no!

Pom zoo: