Cov txheej txheem:

MicroPython Program, Mini Weather Station: 7 Kauj Ruam
MicroPython Program, Mini Weather Station: 7 Kauj Ruam

Video: MicroPython Program, Mini Weather Station: 7 Kauj Ruam

Video: MicroPython Program, Mini Weather Station: 7 Kauj Ruam
Video: Raspberry Pi Pico W: Wireless Weather Station 2024, Kaum ib hlis
Anonim
MicroPython Program, Mini Weather Station
MicroPython Program, Mini Weather Station

Nws yog lub caij ntuj no tam sim no, tab sis nws tseem zoo li kub me ntsis, txawm tias kuv tsuas yog hnav lub tsho T-shirt, uas ua rau kuv xav paub qhov kub thiab txias tam sim no, yog li kuv siv Micropython ESP32 thiab DHT11 lub ntsuas cua thiab qhov chaw yooj yim huab cua yog li koj tuaj yeem tau txais qhov kub thiab txias tam sim no hauv txhua lub browser, tam sim no kuv yuav qhia cov txheej txheem nrog koj.

Kauj Ruam 1: Cov khoom siv

Khoom siv
Khoom siv

Kho vajtse:

  • MakePython ESP32 Cov
  • DHT11
  • Pawg mov ci
  • Dhia kab
  • USB cable

MakePython ESP32 yog ESP32 pawg thawj coj nrog kev sib xyaw SSD1306 OLED zaub, koj tuaj yeem tau txais nws los ntawm qhov txuas no:

www.makerfabs.com/makepython-esp32.html

Cov software

uPyCraft IDE

Nyem qhov txuas no mus rub uPyCraft IDE rau Windows:

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv
  1. MakePython ESP32 thiab DHT11 tau ntsaws rau hauv lub khob cij.
  2. DHT11 tsuas xav tau 3 xov hlau, VCC thiab GND txuas nrog 3V3 thiab GND ntawm ESP32, thiab DATA txuas nrog IO14 ntawm ESP32. Kuv siv GPIO14 hauv kev sim, yog li kuv txuas nrog IO14.
  3. Txuas MakePython ESP32 rau PC siv USB cable, Qhib tus thawj tswj ntaus ntawv (Tsuas yog tshawb rau "ntaus ntawv" hauv Windows tshawb nrhiav lub thawv). Thaum nthuav dav, ntu chaw nres nkoj yuav tsum tso saib qee yam zoo li saum toj no. Sau ntawv ntawm tus lej chaw nres nkoj, xws li COM19 hauv kuv qhov xwm txheej. Yog tias tsis muaj chaw nres nkoj tshwm, sim rub lub USB tsav:

Kauj Ruam 3: UPyCraft Cov Lus Qhia rau Kev Siv

UPyCraft Cov Lus Qhia rau Kev Siv
UPyCraft Cov Lus Qhia rau Kev Siv
UPyCraft Cov Lus Qhia rau Kev Siv
UPyCraft Cov Lus Qhia rau Kev Siv

Cov lus qhia ntxaws rau uPyCraft tuaj yeem pom ntawm qhov txuas no:

www.makerfabs.com/makepython-esp32-starter…

  • Nyem qhov txuas saum toj no los qhib nplooj ntawv
  • Nrhiav MicroPython ESP32 Dev Kit Cov Lus Qhia
  • Nyem rub tawm los qhib daim ntawv
  • Cov ncauj lus qhia ntxaws muaj nyob hauv I. MicroPython Development Tools directory

Yog lawm, cov ntaub ntawv no tsis yog hais txog uPyCraft cov lus qhia, tab sis kuj suav nrog qee qhov MicroPython ESP32 ib txwm ua thiab nquag nug cov lus nug thiab ua yuam kev.

Kauj ruam 4: Txoj Cai Rub Tawm

Txoj Cai Download
Txoj Cai Download
Txoj Cai Download
Txoj Cai Download

Cov cai rau ssd1306.py tau rub tawm los ntawm GitHub chaw cia khoom: https://github.com/ckuehnel/MicroPython-on-ESP32 lossis rub kuv li.

Tom qab rub tawm ssd1306.py, qhib cov ntawv, thiab nyem Txuag thiab DownAndRun. "download tau ok" yuav muab tso tawm thaum lub download tau ua tiav.

Tom qab rub tawm main.py, yuav tsum hloov pauv hauv qab no:

1. Hloov lub npe network thiab tus password:

  • SSID: yuav tsum hloov pauv mus rau koj lub npe network hauv zos
  • PASSWORD: yuav tsum hloov pauv mus rau koj tus lej network network

Thaum koj ua tiav, nyem DownAndRun thiab MakePython ESP32 txuas rau WiFi

2. DHT11 cov ntaub ntawv tus pin:

Yog DHT11 tau txais tus Pin hloov ntawm MakePython ESP32, hloov tus lej hauv tus Pin () rau Tus Pin koj tau txais.

Kauj ruam 5: Tau IP Chaw Nyob

Tau IP Chaw Nyob
Tau IP Chaw Nyob

Khiav main.py, kev ua tiav network, koj tuaj yeem pom tus IP chaw nyob (kuv li: 192.168.1.120).

Kauj ruam 6: Qhib Browser

Qhib Browser
Qhib Browser

Qhib qhov browser ntawm koj lub PC, ntaus tus IP chaw nyob uas koj nyuam qhuav tau txais (192.168.1.120), thiab nyem Enter kom paub meej.

Kauj Ruam 7: Tam sim no Huab Cua

Tam sim no Huab Cua
Tam sim no Huab Cua

Qhov browser nthuav qhia qhov kub thiab txias tam sim no, nrog rau OLED zaub ntawm MakePython ESP32. Thaum koj rov ua nplooj ntawv tshiab, cov ntaub ntawv ntsuas kub thiab av noo kuj tseem yuav rov ua dua tshiab.

Chaw nres tsheb huab cua mini yog qhov yooj yim. Kuv yuav ntxiv cov ntaub ntawv los ntawm cov pa ntsuas pa, lub ntsuas cua los nag, huab cua ntsuas huab cua thiab lwm yam ntsuas los txhawb qhov chaw nres tsheb huab cua.

Pom zoo: