Cov txheej txheem:

ESP32: Cov Lus Qhia Sab Hauv thiab Pinout: 11 Kauj Ruam
ESP32: Cov Lus Qhia Sab Hauv thiab Pinout: 11 Kauj Ruam

Video: ESP32: Cov Lus Qhia Sab Hauv thiab Pinout: 11 Kauj Ruam

Video: ESP32: Cov Lus Qhia Sab Hauv thiab Pinout: 11 Kauj Ruam
Video: 2023 Tesla MODEL Y Performance ⚠️ BUT Did You See… 🤤😘 #Shorts #Short #Tesla #teslamodely 2024, Kaum ib hlis
Anonim
Image
Image

Hauv kab lus no, peb yuav tham txog cov ntsiab lus sab hauv thiab kev txhawb nqa ntawm ESP32. Kuv yuav qhia koj li cas txhawm rau txheeb xyuas cov pins kom raug los ntawm kev saib ntawm cov ntawv teev tseg, yuav txheeb xyuas qhov twg ntawm cov pins ua haujlwm li OUTPUT / INPUT, yuav ua li cas thiaj li muaj cov ntsiab lus hais txog cov ntsuas thiab cov khoom siv uas ESP32 muab rau peb, ntxiv rau khau raj. Yog li ntawd, kuv ntseeg tias, nrog cov vis dis aus hauv qab no, kuv yuav tuaj yeem teb ob peb nqe lus nug uas kuv tau txais hauv cov lus thiab cov lus hais txog ESP32 cov lus qhia, ntawm lwm cov ntaub ntawv.

Kauj Ruam 1: NodeMCU ESP-WROOM-32

ESP-WROOM-32
ESP-WROOM-32

Ntawm no peb muaj tus PINOUT ntawm

WROOM-32 uas yog qhov siv zoo rau thaum koj ua haujlwm. Nws yog ib qho tseem ceeb uas yuav tsum tau them sai sai rau Lub Hom Phiaj Tawm Tswv Yim / Tawm Tawm (GPIOs), uas yog, cov ntaub ntawv tuaj yeem nkag tau thiab tso tawm cov chaw nres nkoj, uas tseem tuaj yeem yog tus hloov pauv AD lossis Touch Pin, xws li GPIO4, piv txwv. Qhov no kuj tshwm sim nrog Arduino, qhov twg cov tswv yim nkag thiab tawm pins tuaj yeem yog PWM.

Kauj Ruam 2: ESP-WROOM-32

Hauv cov duab saum toj no, peb muaj ESP32 nws tus kheej. Muaj ntau hom kev ntxig nrog cov yam ntxwv sib txawv raws li cov chaw tsim khoom.

Kauj Ruam 3: Tab sis, Dab Tsi Yog Qhov Pinout Rau Kuv Siv Rau Kuv ESP32?

Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?
Tab sis, Dab Tsi Yog Qhov Pinout Zoo Rau Kuv Siv Rau Kuv ESP32?

ESP32 tsis nyuaj. Nws yooj yim heev uas peb tuaj yeem hais tias tsis muaj kev txhawj xeeb txog kev ua haujlwm hauv koj ib puag ncig. Txawm li cas los xij, peb yuav tsum tau ua kev qhuab qhia, yog. Yog tias koj xav tau phiaj xwm hauv Assembler, uas yog. Tab sis, lub sijhawm engineering yog kim. Yog li, yog txhua yam uas yog tus muab khoom siv thev naus laus zis muab rau koj lub cuab yeej siv sijhawm los nkag siab txog nws cov haujlwm, qhov no tuaj yeem dhau los ua teeb meem rau koj, vim tias txhua yam no yuav ua rau lub sijhawm siv tshuab ntau ntxiv, thaum cov khoom lag luam nce zuj zus. Qhov no piav qhia kuv qhov kev nyiam rau yam yooj yim, cov uas tuaj yeem ua rau peb niaj hnub yooj yim dua, vim tias lub sijhawm tseem ceeb, tshwj xeeb tshaj yog nyob hauv lub ntiaj teb tsis khoom niaj hnub no.

Rov qab mus rau ESP32, hauv cov ntawv teev tseg, zoo li hauv ib qho saum toj no, peb muaj tus lej tus lej tseeb hauv qhov tseem ceeb. Feem ntau, daim ntawv lo ntawm lub nti tsis sib xws tus lej tseeb ntawm tus pin, raws li peb muaj peb xwm txheej: GPIO, tus lej lej, thiab tseem tus lej ntawm daim npav nws tus kheej.

Raws li qhia hauv qhov piv txwv hauv qab no, peb muaj kev sib txuas ntawm LED hauv ESP thiab hom kev teeb tsa raug:

Daim ntawv ceeb toom tias daim ntawv lo yog TX2, tab sis peb yuav tsum ua raws qhov qhia kom raug, raws li tau hais tseg hauv daim duab dhau los. Yog li ntawd, qhov qhia kom raug ntawm tus pin yuav yog 17. Daim duab qhia tias yuav kaw qhov chaws li cas.

Kauj ruam 4: INPUT / OUTPUT

INPUT / OUTPUT
INPUT / OUTPUT

Thaum ua qhov kev ntsuas INPUT thiab OUTPUT ntawm tus pin, peb tau txais cov txiaj ntsig hauv qab no:

INPUT tsis ua haujlwm nkaus xwb ntawm GPIO0.

OUTPUT tsis ua haujlwm nkaus xwb ntawm GPIO34 thiab GPIO35 tus pin, uas yog VDET1 thiab VDET2, feem.

* Tus VDET pins koom nrog lub hwj chim ntawm RTC. Qhov no txhais tau tias lawv tuaj yeem siv ua ADC pins thiab ULP-coprocessor tuaj yeem nyeem lawv. Lawv tuaj yeem tsuas yog nkag thiab tsis tawm mus.

Kauj Ruam 5: Thaiv Daim Duab

Thaiv daim duab
Thaiv daim duab

Daim duab qhia no qhia tias ESP32 muaj ob tus tub ntxhais, ib cheeb tsam nti uas tswj WiFi, thiab lwm thaj chaw uas tswj hwm Bluetooth. Nws kuj tseem muaj kho vajtse nrawm rau encryption, uas tso cai txuas rau LoRa, lub network ntev-deb uas tso cai rau kev txuas mus txog 15km, siv tus kav hlau txais xov. Peb kuj soj ntsuam lub tshuab hluav taws xob moos, lub sijhawm tiag tiag, thiab lwm cov ntsiab lus cuam tshuam nrog, piv txwv li, PWM, ADC, DAC, UART, SDIO, SPI, thiab lwm yam. Qhov no txhua yam ua rau lub cuab yeej ua tiav thiab ua haujlwm tau zoo.

Kauj Ruam 6: Cov Khoom Siv Hluav Taws Xob thiab Cov Hluav Taws Xob

Peripherals thiab Sensors
Peripherals thiab Sensors

ESP32 muaj 34 GPIOs uas tuaj yeem muab rau ntau txoj haujlwm, xws li:

Digital nkaus xwb;

Analog-enabled (tuaj yeem teeb tsa ua digital);

Capacitive-touch-enabled (tuaj yeem teeb tsa ua digital);

Lwm tus.

Nws yog ib qho tseem ceeb kom nco ntsoov tias feem ntau ntawm GPIOs digital tuaj yeem teeb tsa ua sab hauv rub tawm lossis rub tawm, lossis teeb tsa kom muaj kev tiv thaiv siab. Thaum teeb tsa ua tswv yim, tus nqi tuaj yeem nyeem tau los ntawm kev sau npe.

Kauj ruam 7: GPIO

Analog-rau-Digital Converter (ADC)

Esp32 koom ua ke 12-ntsis ADCs thiab txhawb kev ntsuas ntawm 18 raws (cov cim sib txuas ua ke). ULP-coprocessor hauv ESP32 kuj tseem tsim los ntsuas qhov ntsuas hluav taws xob thaum ua haujlwm hauv hom pw, uas tso cai rau siv hluav taws xob tsawg. CPU tuaj yeem tsim los ntawm qhov chaw pib thiab / lossis dhau los ntawm lwm qhov ua rau.

Digital-rau-Analog Converter (DAC)

Ob qhov 8-ntsis DAC raws tuaj yeem siv los hloov ob lub cim digital rau ob qhov sib piv qhov hluav taws xob tso tawm. Cov DAC ob leeg no txhawb nqa lub zog siv ua cov khoom siv hluav taws xob siv thiab tuaj yeem tsav lwm qhov kev siv hluav taws xob. Dual raws txhawb kev hloov pauv ywj pheej.

Kauj Ruam 8: Sensors

Sensors
Sensors
Sensors
Sensors

Kov Sensor

ESP32 muaj 10 lub peev xwm nrhiav pom GPIOs uas pom qhov hloov pauv thaum kov lossis nce mus txog GPIO nrog tus ntiv tes lossis lwm yam khoom.

ESP32 kuj tseem muaj Qhov Kub Kub Sensor thiab Sab Hauv Tsev Sensor, tab sis txhawm rau ua haujlwm nrog lawv, koj yuav tsum hloov pauv cov chaw teev npe. Yog xav paub ntau ntxiv, saib cov ntawv qhia kev siv los ntawm qhov txuas:

www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf

Kauj Ruam 9: Saib Xyuas

ESP32 muaj peb lub sijhawm saib xyuas: ib qho ntawm ob qho ntawm ob lub timer modules (hu ua Primary Watchdog Timer, lossis MWDT) thiab ib qho ntawm RTC module (hu ua RTC Watchdog Timer lossis RWDT).

Kauj ruam 10: Bluetooth

Bluetooth
Bluetooth
Bluetooth
Bluetooth

Bluetooth Interface v4.2 BR / EDR thiab Bluetooth LE (lub zog qis)

ESP32 suav nrog kev tswj hwm kev sib txuas ntawm Bluetooth thiab Bluetooth lub hauv paus, uas ua cov txheej txheem hauv paus thiab lwm yam kev sib txuas hauv qib qis, xws li kev hloov pauv / hloov pauv, pob ntawv ua tiav, ua ntu me ntsis, ua haujlwm ntau zaus, thiab lwm yam.

Tus tswj kev sib txuas ua haujlwm hauv peb lub xeev tseem ceeb: tos, txuas, thiab hnia. Nws tso cai rau ntau qhov kev sib txuas thiab lwm yam haujlwm, xws li nug, nplooj ntawv, thiab ruaj ntseg ua ke yooj yim, thiab yog li tso cai rau Piconet thiab Scatternet.

Kauj ruam 11: Khau raj

Khau raj
Khau raj
Khau raj
Khau raj

Ntawm ntau qhov kev txhim kho cov laug cam nrog kos USB / Serial, esptool.py tuaj yeem rov pib dua lub rooj tsavxwm rau hom khau raj.

ESP32 yuav nkag mus rau cov khoom siv thauj khoom thaum lub GPIO0 tau khaws cia qis ntawm qhov rov pib dua. Txwv tsis pub, nws yuav khiav qhov program hauv flash.

GPIO0 muaj lub zog rub tawm sab hauv, yog li nws tsis muaj kev sib txuas, nws yuav nce mus.

Ntau lub laug cam siv lub khawm sau tias "Flash" (lossis "BOOT" ntawm qee qhov kev txhim kho Espressif boards) uas ua rau GPIO0 qis dua thaum nias.

GPIO2 yuav tsum tau sab laug tsis txuas / ntab.

Hauv daim duab saum toj no, koj tuaj yeem pom qhov kev sim uas kuv tau ua. Kuv tso lub oscilloscope rau txhua tus pin ntawm ESP kom pom tias muaj dab tsi tshwm sim thaum nws tau qhib. Kuv pom tias thaum kuv tau txais tus pin, nws tsim cov oscillations ntawm 750 microseconds, raws li qhia hauv thaj chaw tseem ceeb ntawm sab xis. Peb yuav ua dab tsi txog qhov no? Peb muaj ntau txoj hauv kev xaiv, xws li muab ncua nrog lub Circuit Court nrog lub transistor, lub qhov rooj nthuav dav, piv txwv. Kuv taw qhia tias GPIO08 tau thim rov qab. Qhov oscillation tawm mus rau sab saud thiab tsis qis dua.

Lwm qhov nthuav dav yog tias peb muaj qee tus pin uas pib hauv Siab, thiab lwm qhov hauv Qis. Yog li, tus lej PINOUT no yog siv rau thaum ESP32 qhib, tshwj xeeb tshaj yog thaum koj tab tom ua haujlwm nrog lub nra kom ua rau, piv txwv li, triac, xa tawm, tus neeg tiv tauj, lossis qee lub zog.

Pom zoo: