Cov txheej txheem:

Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE: 3 Kauj Ruam
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE: 3 Kauj Ruam

Video: Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE: 3 Kauj Ruam

Video: Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE: 3 Kauj Ruam
Video: LED КУБ НА 312 ПИКСЕЛЕЙ с гироскопом! JLCPCB.COM 2024, Hlis ntuj nqeg
Anonim
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE
Esp32 Kub thiab Vaum Web Server Siv PYTHON & Zerynth IDE

Esp32 yog lub micro-controller zoo kawg, Nws muaj zog ib yam li Arduino tab sis zoo dua! nyuaj heev los txhim kho koj cov phiaj xwm nrog rau SDK tus nom. Thib peb nws yog mob taub hau loj los nrhiav lub tsev qiv ntawv ua haujlwm uas tsim nyog. Yog li cas yog tias koj tuaj yeem siv txhua qhov kev ua haujlwm ntawm mico-maub los thaum tseem sau nws hauv PYTHON. Nws puas ua qhov txawv? Yog lawm, Python yog qhov muaj zog, nyeem tau yooj yim thiab sau tau yooj yim. Ntxiv rau koj tsis tas yuav txhawj xeeb txog txhua yam ntawm qib qis (taw qhia, sau npe thiab teeb tsa cov ntaub ntawv) Tsis tas li, Koj siv Zerynth ruaj khov system. Yog koj tseem tsis tau paub txog Zerynth tsis tau, nws yog qhov loj tom ntej!

Nws muab rau koj txhua qhov kev ua haujlwm ntawm tus tswj hwm micro nrog kev yooj yim ntawm Python thiab nws yog Dawb

Cia kuv qhia rau koj Esp32 Kub thiab av noo web server sau hauv Python.

Kauj Ruam 1: Kauj Ruam 1: Kev Kho Vajtse

Kauj Ruam 1: Kev Kho Vajtse Txuas
Kauj Ruam 1: Kev Kho Vajtse Txuas
Kauj Ruam 1: Kev Kho Vajtse Txuas
Kauj Ruam 1: Kev Kho Vajtse Txuas

Lub hts221 Temp thiab humidty sensor siv I2C txuas, Koj yuav tsum txuas lub sensor mus rau tus pin tsim nyog hauv ESp32Node-MCU Esp32s Hts221 Sensor

3 v 3 pin 3.3 v pin

GND pin GND pinIO26 SCL tus pin

IO25 SDA tus pin

Kauj Ruam 2: Kauj Ruam 2: ESP32 Code

Kauj ruam 2: ESP32 Code
Kauj ruam 2: ESP32 Code
Kauj ruam 2: ESP32 Code
Kauj ruam 2: ESP32 Code
Kauj ruam 2: ESP32 Code
Kauj ruam 2: ESP32 Code
  • Txuas koj li Esp32 pawg thawj coj txhim kho rau koj lub khoos phis tawj.
  • Rub tawm Qhov Tseeb Zerynth Studio IDE dawb: https://www.zerynth.com/zerynth-studio/ Siv cov lus qhia teeb tsa no los pab koj: https://docs.zerynth.com/latest/official/core.zery …
  • Sab hauv daim ntawv thov; Tsim tus as khauj tshiab thiab teeb tsa koj lub cuab yeej. Siv phau ntawv qhia no los pab koj
  • Tam sim no Tsim txoj haujlwm tshiab los ntawm cov cuab yeej tseem ceeb; Txoj Haujlwm Tshiab Sau lub npe rau txoj haujlwm thiab khaws nws.
  • Nrhiav qhov chaws Txuas nrog
  • Luam cov cai thiab Uplink (upload rau hauv uC)
  • Qhib serial saib
  • Luam Ip-chaw nyob rau koj tus browser thiab qhib lub vev xaib! Yog tias koj xav tau kev pab nrog IDE:

Kauj Ruam 3: Kauj Ruam 3: Qauv Qauv

Kauj ruam 3: Tus Qauv Qauv!
Kauj ruam 3: Tus Qauv Qauv!

Koj tuaj yeem pom tag nrho txoj haujlwm txuas nrog! Qhov no xav qhia koj yooj yim npaum li cas:

los ntawm stm.hts221 ntshuam hts221

temp_hum = hts221. HTS221 (I2C0, D16) #initiate i2C raws tu qauv nrog lub sensor

temp, hum = temp_hum.get_temp_humidity () # tau txais qhov kub thiab txias tam sim no siv lub tsev qiv ntawv!

los ntawm espressif.esp32net ntshuam esp32wifi li wifi_driver #importing Esp32 Wifi tsav tsheb

WifiAP_name = "WIFI AP Name" Wifi_Pass = "Wifi Pass!"

wifi_driver.auto_init ()

wifi.link (WifiAP_name, wifi. WIFI_WPA2, Wifi_Pass) -------------------------------------- ----------------------------------------------------------------------- -------------------------------

Nws yog qhov yooj yim siv Zerynth IDE nrog nab hab sej.

Pom zoo: