Cov txheej txheem:
- Kauj Ruam 1: Sib dhos Cov Khoom
- Kauj ruam 2: Programming Arduino
- Kauj Ruam 3: Hloov Yam thiab Ua Arduino Game Shield
Video: Arduino LCD Game: 3 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Ua ntau yam zoo yog qhov yooj yim heev nrog Arduino microcontrollers. Cov lus qhia no qhia koj yuav tsim qhov yooj yim 1-khawm cov vis dis aus game ua los ntawm cov tes me me thiab Tinkercad Circuits. Nws yog kev ua si sab-scrolling dhia. Qhov no ua haujlwm raws li qhov pib zoo rau tsim koj tus kheej kev ua si los ntawm cov khoom siv hluav taws xob yooj yim.
Daim ntawv teev npe:
- 1 x Arduino UNO
- 1 x LCD npo (16 x 2 cim)
- 1 x Electronics breadboard
- 1 x 220 Ω resistor
- 1 x Pushbutton hloov
- Solid-core hookup hlau
- 1 x USB cable
Kauj Ruam 1: Sib dhos Cov Khoom
Qhov xav tau yog qhia hauv daim duab saum toj no. Pib nrog Arduino tsis muaj zog. Tsis txhob ntsaws rau hauv USB cable. Qhov ntawd yuav tshwm sim hauv qib tom ntej thaum nws txog sijhawm rau program nws thiab sim ua si tawm.
Siv txoj hlua txuas ntev los txuas 5V teeb liab ntawm Arduino mus rau sab laug deb ntawm kab liab nyob rau sab saum toj ntawm lub khob cij.
Siv txoj hlua txuas ntev los txuas GND lub teeb liab mus rau sab laug ntawm cov dub (lossis xiav ntawm qee lub rooj noj mov) ua kab saum toj kawg ntawm lub khob cij.
LCD (Cov Khoom Siv Crystal Display) muaj 16-tus pin txiv neej lub taub hau nyob hauv qab. Txuas qhov no rau hauv daim ntawv qhia zaub mov raws li qhia hauv daim duab. Txhua yam ntawm cov cim hluav taws xob uas ua kom lub zog thiab tswj lub LCD dhau los ntawm kab ntawv no.
Cov pins no (ntawm sab laug mus rau sab xis):
- GND - lub zog hauv av teeb liab
- VCC - teeb liab lub zog zoo
- V0 - sib piv kho
- RS - sau npe xaiv
- R/W - nyeem/sau xaiv
- E - kev pabcuam ua haujlwm teeb liab
- DB0 - cov ntaub ntawv me 0 (tsis siv ntawm no)
- DB1 - cov ntaub ntawv me ntsis 1 (tsis siv ntawm no)
- DB2 - cov ntaub ntawv me ntsis 2 (tsis siv ntawm no)
- DB3 - cov ntaub ntawv me ntsis 3 (tsis siv ntawm no)
- DB4 - cov ntaub ntawv ntsis 4
- DB5 - cov ntaub ntawv me ntsis 5
- DB6 - cov ntaub ntawv me ntsis 6
- DB7 - cov ntaub ntawv me ntsis 7
- LED+ - backlight LED zoo
- LED- - backlight LED tsis zoo
Siv cov xov hlau txuas luv, txuas GND thiab LED- (tus pin 1 thiab 16) rau kab dub nyob saum toj.
Ib yam li ntawd, txuas VCC (tus pin 2) mus rau kab liab nyob rau sab saum toj nrog txoj hlua txuas luv.
Khoov cov hlau ua ntawm 220 Ω tus tiv thaiv (liab-liab-xim av xim bands) thiab txuas nws ntawm LED+ thiab kab liab nyob rau sab saum toj ntawm lub khob cij.
Siv cov xov txuas ntev dua los ua qhov seem ntawm kev sib txuas:
- Txuas DB7 rau Arduino tus pin 3
- Txuas DB6 rau Arduino tus pin 4
- Txuas DB5 rau Arduino tus pin 5
- Txuas DB4 rau Arduino tus pin 6
- Txuas E rau Arduino tus pin 9
- Txuas R/W rau Arduino tus pin 10 (lossis rau kab dub nyob saum lub khob cij)
- Txuas RS rau Arduino tus pin 11
- Txuas V0 rau Arduino tus pin 12 (lossis rau kab dub nyob saum lub khob cij)
Ntsaws lub laub khawm qhov twg mus rau sab laug ntawm lub vijtsam LCD, straddling cov channel khiav raws nruab nrab ntawm lub khob cij (saib daim duab saum toj no). Txuas ib qho ntawm ob sab saum toj ntawm lub khawm mus rau kab dub nyob rau sab saum toj ntawm lub khob cij siv lub xov tooj sib txuas luv. Txuas lwm tus pin nyob rau sab saum toj ntawm lub pob kom tus pin 2 ntawm Arduino.
Kauj ruam 2: Programming Arduino
Txij ntawm no mus, koj yuav tsum tau npaj rau program Arduino thiab sim nws tawm.
Pib los ntawm kev ua kom ntseeg tau tias koj muaj Arduino software teeb tsa hauv koj lub computer. Rub tawm LCD_Game.ino cov ntaub ntawv ntawm nplooj ntawv no rau koj lub khoos phis tawj thiab qhib nws hauv Arduino software. Xyuas kom lub rooj tsavxwm tau teeb tsa kom raug rau lub cajmeem (Cuab Yeej → Pawg → Arduino Uno).
Txuas Arduino rau koj lub computer siv USB cable. Qhov no yuav muab lub zog rau Arduino/game thiab tso cai rau koj rub koj cov ntawv mus rau Arduino.
Txij ntawm no mus, lub vijtsam ntawm lub vijtsam LCD yuav tsum ci.
Program Arduino los ntawm kev xaiv File → Upload (lossis nias lub khawm sab xis saum toj ntawm Arduino software).
Yog tias txhua yam mus tau zoo, lub vijtsam LCD yuav tsum tam sim no qhia pom qhov pib game zoo li hauv daim duab saum toj no.
Kauj Ruam 3: Hloov Yam thiab Ua Arduino Game Shield
Txij ntawm no koj muaj txhua yam ua haujlwm, yog li yuav muaj dab tsi ntxiv?
Yog tias koj xav hloov txoj kev ua haujlwm ntawm kev ua si, lossis ua kom txias txias luam tawm pawg thawj coj saib rau txoj haujlwm no uas txuas ncaj qha mus rau Arduino thiab hloov tag nrho cov xov tsis zoo, ntawm no yog yuav pib li cas.
Kuv tsim qhov kev ua si nkaus siv qhov txias heev (DAWB!) Online hluav taws xob simulator Tinkercad Circuits. Kuv tau muaj qhov kev ua si tag nrho ua haujlwm thiab sim ua ntej puas tau siv Arduino tawm ntawm cov khoom siv. Nov yog lub voj voog virtual rau Arduino LCD game.
Koj tuaj yeem ua qhov kev ua si raug cai hauv koj tus browser yam tsis tau muab tso ua ke ib qho khoom siv hluav taws xob tiag tiag ("Auj, tam sim no koj qhia kuv"). Yog tias koj xav hloov pauv qhov kev ua si, lossis tshawb xyuas seb muaj dab tsi tshwm sim, koj tuaj yeem luam theej tawm lub voj voog virtual uas siv "Duplicate Project" khawm. Tom qab ntawd koj tuaj yeem hloov kho qhov chaws thiab sim hloov pauv nyob ntawd. Kuj tseem muaj qhov tshwj xeeb debugger qhov twg koj tuaj yeem hla dhau txoj haujlwm ib-kab-kab thiab pom dab tsi tshwm sim!
Yog tias koj xav tau ntau, koj tseem tuaj yeem ua lub rooj tsav xwm hauv Circuit kom txuas koj cov khoom siv hluav taws xob zoo rau Arduino. Txoj haujlwm muaj "Download Gerber" khawm uas yuav tau txais koj cov ntaub ntawv tsim nyog muab rau lub chaw tsim khoom luam tawm Circuit Board (PCB) kom muaj kev cai luam tawm Circuit board ua. Nov yog qee cov ntaub ntawv muaj txiaj ntsig ntawm kev tau txais PCB ua.
Txaus siab rau!
Pom zoo:
YADPF (YET Lwm Tus Duab Duab Duab): 7 Kauj Ruam (nrog Duab)
YADPF (YET Lwm Tus Duab Duab Duab): Kuv paub qhov no tsis yog khoom tshiab, Kuv paub, Kuv tau pom qee qhov ntawm cov haujlwm no ntawm no, tab sis kuv ib txwm xav tsim kuv tus kheej cov duab thav duab. Txhua daim duab thav duab kuv tau pom yog qhov zoo, tab sis kuv tab tom nrhiav lwm yam, Kuv tab tom nrhiav qhov zoo nkauj tiag tiag
Kev Tsim Qauv Duab Duab/Duab Duab Duab: 4 Kauj Ruam
Kev Tsim Qauv Duab Duab/Duab Duab Duab: Nyob zoo txhua tus, Hauv qhov kev qhia no, Kuv yuav qhia koj cov txheej txheem ntawm yuav ua li cas thiaj tsim 3D qauv siv cov duab digital. Cov txheej txheem hu ua Photogrammetry, tseem hu ua Image-Based Modeling (IBM). Tshwj xeeb, hom txheej txheem no tau siv los rov ua dua
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv