Cov txheej txheem:
- Kauj Ruam 1: ESP32 Boards, Arduino IDE Installation thiab VGA Library Configuration
- Kauj Ruam 2: Tshaj Tawm Txoj Cai Me Me rau ESP32
- Kauj Ruam 3: Txuas VGA Port
- Kauj ruam 4: Txuas PS2 Port
- Kauj Ruam 5: Ua Haujlwm Nrog Tiny Basic
- Kauj Ruam 6: Txuas SD daim npav nco
- Kauj Ruam 7: Kev lees paub
Video: ESP32 Basic PC With VGA Output: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hauv Cov Lus Qhia no Kuv yuav los qhia yuav ua li cas tsim kom yooj yim retro style PC ua tiav nrog ib tus ESP32 thiab ob peb lwm yam khoom siv.
Lub PC no sau Tiny Basic, cov lus yooj yim ntawm BASIC, thiab tsim cov zis rau VGA saib.
Kev daws teeb meem yog 640x350 pixels, tso cai 80x25 asci cim hauv 8 xim. Cov keyboard PS2 tuaj yeem txuas nrog thiab siv los sau cov cai, tso cai txog 14059 bytes nco.
ESP32 I/O pins tuaj yeem tsav ncaj qha los ntawm kev cog lus BASIC cov lus txib.
Txoj haujlwm no ua tau los ntawm txaus ESP32 VGA lub tsev qiv ntawv sau los ntawm Fabrizio Di Vittorio. Saib ntawm no kom paub meej ntxiv.
Kauj Ruam 1: ESP32 Boards, Arduino IDE Installation thiab VGA Library Configuration
Ua ntej tshaj plaws koj yuav tsum yuav ESP32 kev kho dua 1 lossis siab dua. Muaj ntau ntau yam muaj, tab sis kuv pom zoo kom xaiv ib qho nrog ntau tus pin. Kuv siv cov ntawv no, tab sis kuv xav tias ntau lwm yam zoo ib yam. Piv txwv li, hauv kev piav qhia ntawm daim vis dis aus no, koj tuaj yeem pom peb lwm tus qauv uas qis dua 5 daus las.
Thaum koj tau txais lub rooj tsavxwm, koj yuav tsum tau ua tiav nrog peb qib hauv qab no:
- Nruab qhov kawg Arduino IDE
- Kho ESP32 hauv IDE thiab
- Nruab VGA lub tsev qiv ntawv
Cov kauj ruam 1.
Muaj ntau txoj hauv kev los ua haujlwm rau ESP32, tab sis ntawm no koj yuav tsum siv qhov tseeb Arduino IDE (Kuv tab tom siv version 1.8.9). Txhawm rau nruab nws, koj tuaj yeem mus rau nplooj ntawv Arduino IDE thiab ua raws cov lus qhia.
Kauj ruam 2
Thaum ua haujlwm dhau los tiav, koj yuav tsum teeb tsa koj li ESP32 hauv Arduino IDE. Qhov no tsis tseem ceeb, vim tias ESP32 tsis yog (tseem yog?) Ib txwm nyob hauv nws. Koj tuaj yeem ua raws qhov kev qhia no, lossis cov kauj ruam hauv qab no.
1) qhib Arduino IDE
2) qhib lub qhov rai nyiam, Cov Ntaub Ntawv/Nyiam, hloov pauv "Ctrl+comma"
3) mus rau "Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs", luam thiab muab cov ntawv hauv qab no:
https://dl.espressif.com/dl/package_esp32_index.json
thiab nyem lub pob OK.
4) Qhib pawg thawj coj saib xyuas. Mus rau Cov Cuab Yeej/Pawg Thawj Coj/Cov Thawj Tswj …
5) Tshawb nrhiav ESP32 thiab nias lub pob teeb tsa rau "ESP32 los ntawm Espressif Systems":
6) Txij ntawm no mus, thaum koj txuas thawj zaug koj ESP32, koj yuav tsum xaiv tus qauv raug nyob hauv cov npe ntev ntawm ESP32 cov laug cam (saib daim duab hauv cov kauj ruam no). Nyob rau hauv cov ntaub ntawv ntawm kev ua xyem xyav txog tus qauv, tsuas yog xaiv qhov dav, piv txwv li thawj tus. Nws ua haujlwm rau kuv.
7) lub kaw lus tseem yuav tsum xaiv qhov chaw nres nkoj USB raug thiab Upload Speed (ib txwm 921600). Txog tam sim no kev sib txuas ntawm koj lub PC thiab ESP32 pawg thawj coj yuav tsum tsim.
Kauj ruam 3
Thaum kawg koj yuav tsum nruab FabGL VGA lub tsev qiv ntawv. [hloov tshiab Lub Xya Hli 2019] Koj xav tau thiab qub version ntawm qhov kev dag no: koj tuaj yeem rub tawm zip cov ntaub ntawv src.old.zip hauv qab ntawm cov kauj ruam no, uncompress thiab hloov lub npe ua "src" hauv koj li
"… / arduino-1.8.9 / libraries" nplaub tshev.
Thaum koj tau ua tiav cov haujlwm no, koj tuaj yeem mus rau kauj ruam tom ntej thiab xa qhov hloov kho TinyBasic ua raws cov kauj ruam tom ntej.
Kauj Ruam 2: Tshaj Tawm Txoj Cai Me Me rau ESP32
Rub tawm ESP32_TinyBasicPlus_PS2_FabLab_beta.ino hauv qab ntawm cov kauj ruam no.
Qhib nws nrog Arduino IDE thiab xa nws mus rau koj li raw ESP32.
Yog tias koj tsis muaj lus yuam kev, tus lej yuav tsum tau ua haujlwm lawm.
Cov kauj ruam zoo: yog tias koj xav sim TinyBasic ua ntej txuas VGA thiab PS2 keyboard, koj tuaj yeem ua tiav nrog SSH thiab telnet tus thov. Kuv siv PuTTY.
Koj tuaj yeem pom nws zoo li cas hauv cov duab hauv qib no.
Kauj Ruam 3: Txuas VGA Port
Koj xav tau cov hauv qab no:
- DSUB15 Connector, piv txwv li yog VGA poj niam txuas lossis VGA cable kom raug txiav.
- peb 270 Ohm resistors.
Txuas ESP32 GPIO tus pin 2, 15 thiab 21 rau VGA Liab, Ntsuab thiab Xiav feem, dhau ntawm 270 Ohm resistors.
Txuas VGA Hsync thiab Vsync rau ESP32 GPIO pins 17 thiab 4 feem.
Txuas DSUB15 tus pin 5, 6, 7, 8 thiab 10 rau ESP32 GND.
Txog VGA DSUB15 tus lej txuas tus lej txhais, saib daim duab hauv qib no. NB, qhov no yog sab laug ntawm tus poj niam txuas.
Kauj ruam 4: Txuas PS2 Port
Koj xav tau PS2 keyboard poj niam txuas.
Koj tuaj yeem tau txais ib qho los ntawm lub qub PC motherboard, tsuas yog muag nws nrog rab phom cua sov. Hauv daim duab qhia hauv theem no, koj tuaj yeem pom qhov ua haujlwm ntawm tus pin xav tau ntawm PS2 txuas.
Qhov kev txuas yog:
- Cov Ntaub Ntawv Keyboard rau ESP32 GPIO tus pin 32
- Keyboard IRQ (moos) rau ESP32 GPIO tus pin 33
- Koj kuj yuav tsum txuas 5V tus pin thiab GND ib qho.
Kauj Ruam 5: Ua Haujlwm Nrog Tiny Basic
Txij ntawm no mus, yog tias koj tuaj yeem txuas VGA saib thiab PS2 keyboard thiab ESP32 rau lub hwj chim.
Cov duab pom ntawm no yuav tsum tshwm ntawm tus saib. Tam sim no koj tuaj yeem ua si me ntsis nrog Tiny Basic cov lus txib.
Piv txwv, piv txwv li, yuav tsum Nyob Zoo, Lo Lus! infinite voj:
10 luam "Nyob zoo, Ntiaj Teb!"
20 ua 10
khiav
Koj tuaj yeem hloov plaub xim sib txawv nias lub khawm esc, thiab nres lub voj nrog ctrl+c
Nco ntsoov tias yog koj ua qhov yuam kev, koj tsis tuaj yeem thim nws! Los yog zoo dua, koj tuaj yeem tso tseg tab sis tom qab ntawv kho qhov yuam kev tsis raug lees paub. Koj yuav tsum rov sau tag nrho cov kab hais kom ua.
Tam sim no koj tuaj yeem sim qee yam nyuaj dua, xws li tsav lub ntsais ntawm LED nrog txoj haujlwm yooj yim. Txuas, piv txwv li, LED anode (ceg ntev) rau ESP32 GPIO tus pin 13, thiab cathode rau GND.
Tom qab ntawd sau:
tshiab
10 ib = 1000
20 print ua i
30 ncua i
40dwrite 13, siab
50 ncua i
60dwrite 13, qis
70 ib = i*9/10
80 yog tias kuv> 0 tau txais 20
90 end ua
khiav
Koj tuaj yeem pom qhov tshwm sim hauv cov vis dis aus kos rau hauv Cov Lus Qhia no.
Kauj Ruam 6: Txuas SD daim npav nco
Lub PC qub, nws tsis muaj teeb meem me me thiab tsis muaj zog, tsis tuaj yeem ua tiav yog tias koj tsis tuaj yeem khaws koj cov haujlwm mus tas li.
Hauv cov kauj ruam no kuv yuav qhia yuav ua li cas txuas SD daim npav nco, tab sis hmoov tsis zoo, rau lub sijhawm tam sim no (Kuv vam tias tsuas yog lub sijhawm no), kev khaws cia ntawm cov haujlwm tsis ua haujlwm!
BTW, Kuv tau siv lub microSD rau SD daim npav adapter thiab kuv tau siv 8 L-puab tus pin raws li qhia hauv daim duab hauv theem no.
Tom qab ntawd kuv txuas tus SD hloov pauv tus pin rau ESP32 raws li nws daim duab thib ob, piv txwv li kuv txuas ESP32 GPIO pins 5, 18, 19, 23 rau SC, moos, MISO, MOSO feem, ntxiv 3.3V thiab ob GND.
Kuv kuj tau ua raws cov lus qhia thiab piv txwv pom ntawm no, thiab nrog tus lej piv txwv SD_test.ino, kuv tuaj yeem sau ntawm kuv 2 GBytes microSD daim npav.
Yog li yog tias leej twg pom kev daws teeb meem, thov qhia rau kuv sai li sai tau rau kuv tus email [email protected] thiab kuv yuav ua kom tiav Cov Lus Qhia no.
Kauj Ruam 7: Kev lees paub
Kuv xav qhia kuv lub tso tsheb hlau luam rau Fabrizio Di Vittorio rau nws txaus ESP32 VGA tsev qiv ntawv. Yog xav paub ntau ntxiv, piv txwv, thiab… Space Invaders, mus saib nws lub xaib ntawm no.
ua tsaug ntau ntau rau tus sau ntawm Tiny Basic:
- Mike Teb
- Scott Lawrence
- Brian O'Dell: 5 Lab tus kiv cua tos koj rau Webtalk!
Thaum kawg, yog tias koj nyiam txoj haujlwm no, thov sau ntawv tawm tswv yim lossis faib daim duab ntawm lub cuab yeej uas koj tsim … thiab, tag nrho, pov npav rau nws hauv kev sib tw Arduino!
Pom zoo:
Arduino Basic PC With VGA Output: 5 Kauj Ruam (nrog Duab)
Arduino Basic PC With VGA Output: Hauv kuv li Kev Qhia yav dhau los Kuv tau qhia yuav tsim lub khoos phis tawj retro 8-ntsis ua haujlwm li cas, los ntawm ob qho Arduino, thiab nrog lub teeb liab tso tawm hauv B & W rau lub TV TV. Tam sim no kuv yuav qhia yuav ua li cas tsim tib lub computer, tab sis nrog cov teeb liab tso tawm hauv
Arduino Calculator With LED Output: 5 Kauj Ruam
Arduino Calculator With LED Output: Hav guys! Xav kawm paub yuav siv lub tshuab saib xyuas cov ntawv nkag thiab tso tawm li cas. Zoo ntawm no koj tau txais cov lus qhia zoo txog yuav ua li cas! Hauv cov lus qhia no, Kuv yuav coj koj mus rau cov theem yooj yim xav tau los tsim lub laij lej siv Arduino cov lej m
Siv Ultrasonic Distance Sensor thiab Serial Monitor Output.: 6 Kauj Ruam
Siv Ultrasonic Distance Sensor thiab Serial Monitor Output.: Hav guys! Xav kawm paub yuav siv li cas saib xyuas cov ntawv tso tawm. Zoo ntawm no koj tau txais cov lus qhia zoo txog yuav ua li cas! Hauv cov lus qhia no, Kuv yuav coj koj los ntawm cov kauj ruam yooj yim xav tau txhawm rau txheeb xyuas qhov nrug deb siv ultrasonic sensor thiab qhia kuv
Programmable Cyclic Set On-Off Timer With Relay Output: 4 Kauj Ruam
Programmable Cyclic Set On-Off Timer With Relay Output: Qhov haujlwm no yog txhawm rau tsim lub voj voog rau-tawm programmable timer. Hauv qhov haujlwm no tus neeg siv tuaj yeem teeb tsa ON timer thiab Off time siv cov yuam sij thiab 7 ntu tso saib. Kev xa tawm tau muab los ua qhov tso tawm, qhov chaw txuas yuav txuas rau ON rau ON lub sijhawm thiab nws yuav tawm tom qab ON ti
Arduino Basic PC With TV Output: 5 Kauj Ruam (nrog Duab)
Arduino Basic PC With TV Output: Hauv Phau Ntawv Qhia no kuv yuav qhia yuav tsim lub khoos phis tawj retro 8-ntsis ua haujlwm li cas, los ntawm ob Arduino thiab ob peb yam ntxiv. Koj tuaj yeem tawm tswv yim hloov pauv thiab BASIC program nrog lub keyboard PS2, thiab cov txiaj ntsig tau pom ntawm tus saib nrog