Cov txheej txheem:
- Kauj Ruam 1: Nqi Khoom
- Kauj Ruam 2: Txhim Kho MicroPython
- Kauj Ruam 3: Kuaj Qhov Kev Pab Blink
- Kauj Ruam 4: Siv WebREPL
Video: Txoj Haujlwm ESP8266 - MicroPython: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
MicroPython yog txoj haujlwm uas tso cai rau koj los ua haujlwm me me ntawm nab hab sej 3 ntawm microcontrollers thiab cov laug cam. Nws tau nce kev txhawb nqa ntawm microcontroller cov laug cam thiab ntau dua li txhim kho Linux tag nrho cuam tshuam rau hauv lub rooj tsavxwm nws tsuas yog muab qhov tsawg ntawm cov nab hab sej nrog kev hwm rau pawg thawj coj, nrog lub plhaub nab nab thiab koj tuaj yeem xa cov ntaub ntawv nab nab me rau ntawm pawg thawj coj saib thiab khiav nws..
Hauv cov lus qhia no kuv yuav qhia koj yuav siv MicroPython ntawm NodeMCU li cas, NodeMCU yog pawg thawj coj txhim kho raws li esp8266-12.
Kauj Ruam 1: Nqi Khoom
Rau qhov haujlwm no, koj yuav xav tau,
- NodeMCU
- LED
- Cov qhob cij
- Micro USB kab
Kauj Ruam 2: Txhim Kho MicroPython
Txhawm rau nruab micropython ntawm esp8266, Kuv tab tom siv pawg esp8266-12 version. Txhawm rau nruab micropython koj yuav xav tau esptool koj yuav tsum rub tawm thiab teeb tsa sej thiab pip, txhawm rau nruab esptool.
Khiav cov lus txib hauv qab no ntawm lub davhlau ya nyob twg lossis cmd txhawm rau nruab esptool.
pip nruab esptool
Tom ntej no, koj tuaj yeem mus ntsib micropython lub vev xaib thiab rub tawm qhov tseeb firmware rau esp8266, tom qab rub tawm nws qhib lub davhlau ya nyob twg hauv tib cov npe raws li cov ntaub ntawv firmware thiab tom qab ntawd ua raws cov lus txib hauv qab no.
esptool.py --port /dev /ttyUSB0 lwv_flash
esptool.py --port /dev /ttyUSB0 --baud 460800 write_flash --flash_size = ntes 0 esp8266-xxxxx-vxxxx.bin
Koj yuav tsum tau hloov chaw nres nkoj raws koj lub PC. Tom qab qhov no, koj yuav tsum tau ua tiav kev teeb tsa micropython.
Kauj Ruam 3: Kuaj Qhov Kev Pab Blink
Tam sim no koj tau ua tiav kev teeb tsa micropython nws yog lub sijhawm sim ob peb qhov kev xeem los ua qhov no peb yuav tsum qhib lub pob nab nab siv lub ntsuas saib, Kuv siv putty ntawm lub tshuab qhov rais kom qhib qhov saib xyuas ntawm lub chaw nres nkoj com esp8266 tau muab rau.
Lub plhaub nab nab no zoo ib yam li nab nab 3 lub plhaub, khiav cov ntawv hauv qab no kom ntsais ib qho txuas nrog rau esp8266.
ntshuam esppin = tshuab. Pin (0) tus pin = tshuab. Pin (0, tshuab. Pin. OUT)
Tom qab ntawv khiav kab hauv qab ntawm kab ntawv nab hab sej yuav qhib rau coj thiab kab thib ob yuav tua nws.
pin.value (1) pin.value (0)
Hloov pauv, koj kuj tseem tuaj yeem ua cov kab no los ua tib yam.
pin.off () pin.on ()
Kauj Ruam 4: Siv WebREPL
Tam sim no cia peb qhib micropython WebREPL uas tso cai rau peb rub cov ntawv sau mus rau esp8266 hla WiFi li tshem tawm qhov xav tau ntawm cov xov hlau.
Ua ntej, peb yuav tsum pab kom WebREPL, qhib lub davhlau ya nyob twg thiab ua raws cov kab hauv qab no, qhov teeb tsa no yog lub webrepl thiab nug koj kom teeb tus password kom txhim kho kev nyab xeeb.
ntshuam webrepl_setup
Tom ntej no, koj yuav tsum pom WiFi nkag mus rau npe hu ua MicroPython-xxxxxx, txuas rau nws thiab qhib lub vev xaib internet thiab mus ntsib webREPL lub vev xaib. Tam sim no koj yuav tsum tau txais lub vev xaib, ntaus txuas thiab sau tus password uas koj tsim. Tam sim no koj tuaj yeem ua cov ntawv sau ntawm esp8266 wireless.
Tam sim no koj tau txais micropython thiab khiav koj tuaj yeem ua cov ntawv sau ntawm nws, zoo ib yam li koj ua raspberry pi. Muaj ntau ntau cov qauv muaj rau micropython los ua haujlwm nrog thiab koj tuaj yeem tau txais cov ntaub ntawv zoo ntawm nws hauv micro python official lub vev xaib hauv qab esp8266 qeb.
Pom zoo:
Sib Nqus Hloov Qhov Rooj Tswb Sensor, Ib txwm Qhib, Txoj Haujlwm Yooj Yim, 100% Ua Haujlwm, Cov Cai Tau Muab: 3 Kauj Ruam
Sib Nqus Hloov Qhov Rooj Tswb Sensor, Ib txwm Qhib, Txoj Haujlwm Yooj Yim, 100% Ua Haujlwm, Cov Cai Tau Txais: Nqe lus piav qhia: Nyob zoo cov neeg, Kuv yuav los qhia txog MC-18 Sib Nqus Hloov Sensor Tswb uas ua haujlwm ib txwm qhib. Hloov Hom: TSIS YOG (hom Kaw ib txwm), lub Circuit Court tau qhib ib txwm muaj, thiab, kev sib txuas tau txuas nrog thaum cov hlau nplaum nyob ze. The reed… nyeem ntxiv
Ultrasonics Raws Txoj Haujlwm Txoj Haujlwm: 4 Kauj Ruam (nrog Duab)
Ultrasonics Raws Qhov Txheej Txheem: Txhua qhov hloov pauv ntawm ultrasonic radars Kuv tau pom rau cov khoom siv arduino (Arduino - Radar/Ultrasonic Detector, Arduino Ultrasonic Radar Project) zoo heev radars tab sis txhua tus ntawm lawv yog "dig muag". Kuv txhais tau tias, lub radar pom qee yam tab sis kuv
Yuav Ua Li Cas Upload Txoj Haujlwm lossis Txoj Cai Rau Hauv Arduino Pro Mini los ntawm Kev Siv CH340 UART Serial Converter Cable: 4 Cov Kauj Ruam
Yuav Ua Li Cas Txhim Kho Txoj Haujlwm lossis Txoj Cai Rau Hauv Arduino Pro Mini los ntawm Kev Siv CH340 UART Serial Converter Cable: USB TTL Cov lej txuas yog ntau yam ntawm USB rau txuas txuas txuas txuas uas muab kev sib txuas ntawm USB thiab txuas UART cuam tshuam. Ntau cov kab hluav taws xob tau muaj kev sib txuas ntawm 5 volts, 3.3 volts lossis cov neeg siv tau teev tseg cov teeb liab theem wi
Yooj Yim ABB PLC Txoj Haujlwm- Txoj Haujlwm Kawm Ntawv: 17 Kauj Ruam (nrog Duab)
Yooj Yim ABB PLC Txoj Haujlwm- Txoj Haujlwm Kev Kawm: Nov yog txoj haujlwm yooj yim uas lub hom phiaj rau kev siv CoDesys software nrog Ladder Diagram (LD) lus. muaj nuj nqi .., Sau cov txheej txheem
3 Txoj hauv kev yooj yim ntawm Txoj Haujlwm ESP8266 12X Module: 5 Cov Kauj Ruam (nrog Duab)
3 Txoj hauv kev yooj yim ntawm Txoj Haujlwm ESP8266 12X Module: Yog tias koj tsis paub nrog ESP8266 micro maub los, Kuv yeej xav tias koj tau ploj lawm! Cov no yog qhov tsis txaus ntseeg: lawv pheej yig, muaj zog thiab zoo tshaj plaws ntawm txhua tus muaj WiFi-built