Cov txheej txheem:
Video: ESP8266 Relay-tswj: 3 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hloov tshiab (07.02.2017): Kuv tau hloov kho Windows-Version ntawm qhov program los tswj koj li ESP8266. Kuv tau ntxiv qhov "Small Window" -Mode ("SW"): Nws yuav ntsaws lub micro-version ntawm qhov haujlwm saum toj koj lub luag haujlwm rau ntawm sab laug kom koj tuaj yeem nkag mus tau yooj yim dua thaum koj ua haujlwm nrog lwm cov haujlwm. Nws tseem yuav nyob rau ntawm qhov xub thawj txhua lub sijhawm. Nyob zoo, thiab zoo siab tos txais kuv thawj Tus Kws Qhia Ntawv! Dab tsi yuav qhia qhia rau kuv no? Kuv yuav qhia koj hauv Phau Ntawv Qhia no yuav ua li cas tswj lub rooj sib tham relay nrog 4 qhov txuas - lossis ntau dua- nrog Android-Smartphone lossis Windows-PC. Yog tias koj siv 4 Relays lossis tsawg dua koj tuaj yeem siv App rau Android lossis Windows ntawm kuv li. Yog tias koj xav siv ntau dua, koj yuav tsum txuas ntxiv txhim kho txoj cai koj tus kheej. Yog li, koj yuav tau txais cov cai kuv tsim tseem tsis tau. Kuv xav tau dab tsi? Koj yuav xav tau ESP8266-Module. Kuv yuav siv D1 Mini version ntawm ESP8266 thiab kuv pom zoo kom siv qhov no lossis zoo ib yam ib yam nkaus vim tias kuv tsis paub yog tias koj tuaj yeem ua haujlwm lwm yam ntawm ESP8266 kom yooj yim ib yam li D1 Mini. Koj kuj tseem yuav xav tau, qhov hloov pauv tus qauv zoo li koj pom hauv cov duab Kuv tau yuav cov: https://ebay.eu/2iQLv3s - Relay Module nrog 4 relayhttps://ebay.eu/2iQUwtr - D1 Mini NodeMCU Module
Kauj ruam 1: Cia Peb Pib
Npaj ESP8266-Module:
Ua ntej, rub tawm cov ntawv hauv qab no rau koj Windows-Computer:
NodeMCU-Flasher:
ESPlorer (txuas nrog ZIP-File down)
init.lua (txuas nrog)
Teeb nyem ESP8266-Module:
-Connect ESP8266-Module nrog koj lub Computer ntawm USB thiab tos kom txog thaum txhua tus tsav tsheb raug teeb tsa (koj lub kaw lus yuav xav tau tus lej-rau-USB-tsav tsheb).
-Open ESP8266Flasher.exe los ntawm NodeMCU-Flasher, xaiv qhov tseeb COM-chaw nres nkoj thiab nyem "Flash". Qhov no yuav siv sijhawm me ntsis.
Tshaj tawm tsab ntawv mus rau ESP8266-Module:
-Qhib ESPlorer. Koj yuav xav tau Java los qhib nws.
-Select qhov tseeb COM-Chaw nres nkoj nyob rau hauv txoj cai tab rau saum thiab nyem "Qhib". Tsis txhob txhawj xeeb yog tias nws hais tias nws tsis tuaj yeem kuaj xyuas lub firmware.
-Cov txoj cai grey qhov rais yuav yog lub luag haujlwm saib xyuas, sab laug ib tus lej code editor. Qhib cov ntaub ntawv init.lua.
(Nws yuav tsum zoo li qhov no ntawm qhov screenshot)
Nkag mus rau koj li Wifi-SSID thiab koj li Wifi-Password.
-Nyem rau "Upload" -Button.
Kauj Ruam 2: Ib Yam Hais Txog Txoj Cai…
Cov kev pab cuam:
Koj tuaj yeem rub tawm "EDR.zip" -File rau Windows thiab "EDR.apk" -File rau Android.
(Ib feem no yog hais txog qhov xav tau kev xa xov ntau npaum li cas. Yog tias koj xav siv 4 lossis tsawg dua, koj tuaj yeem hla cov kauj ruam no.)
Txog init.lua:
Ib feem ntawm txoj cai rau kev tshaj tawm:
_
yog (_GET.pin == "ON") ces _on = "xaiv = tseeb"
gpio.write (1, gpio. HIGH)
elseif (_GET.pin == "OFF") ces
_off = "xaiv = \" tseeb / ""
gpio.write (1, gpio. LOW)
elseif (_GET.pin == "ON2") ces
_on = "xaiv = tseeb"
gpio.write (2, gpio. HIGH)
elseif (_GET.pin == "OFF2") ces
_off = "xaiv = \" tseeb / ""
gpio.write (2, gpio. LOW)
elseif (_GET.pin == "ON3") ces
_on = "xaiv = tseeb"
gpio.write (3, gpio. HIGH)
elseif (_GET.pin == "OFF3") ces
_off = "xaiv = \" tseeb / ""
gpio.write (3, gpio. LOW)
elseif (_GET.pin == "ON4") ces
_on = "xaiv = tseeb"
gpio.write (4, gpio. HIGH)
elseif (_GET.pin == "OFF4") ces
_off = "xaiv = \" tseeb / ""
gpio.write (4, gpio. LOW)
kawg
_
Kuv paub tseeb, koj tuaj yeem pom cov phiaj xwm:
rau txhua Realy muaj qhov thaiv kab lus no:
elseif (_GET.pin == "ON_NUMBER_OF_RELAY") ces _on = "xaiv = tseeb"
gpio.write (GPIO_NUMBER, gpio. HIGH)
elseif (_GET.pin == "OFF_NUMBER_OF_RELAY") ces
_off = "xaiv = \" tseeb / ""
gpio.write (GPIO_NUMBER, gpio. LOW)
Tsuas yog ib yam ntxiv. Thaum pib ntawm txoj cai tau sawv:
gpio.mode (1, gpio. OUTPUT) gpio.mode (2, gpio. OUTPUT) gpio.mode (3, gpio. OUTPUT) gpio.mode (4, gpio. OUTPUT)
Yog li tseem yuav tau ntxiv:
gpio.mode (GPIO_NUMBER. OUTPUT)
Kuv paub tseeb tias koj tuaj yeem lis qhov no;-)
Txog qhov chaws ntawm kuv qhov Windows-Program:
Yog tias koj xav kho qhov no, koj yuav tsum paub qee yam txog C# thiab koj yuav tsum muaj Tus Qauv ntawm Visual Studio 2015 lossis sib xws. Kuv yuav txuas qhov haujlwm li ZIP-File ib yam (EDR.zip).
Txog Android-APP:
Yog tias koj xav tau Android-App, koj yuav xav tau AppInventor2. Muaj ib qho dawb online version ntawm nws. Koj tuaj yeem qhib qhov txuas "EDR.aia" -File muaj thiab kho nws raws li koj xav tau.
Kauj Ruam 3: Qhov Kawg…
Yog li ntawd, tag nrho.
Yog tias koj muaj qee lub tswv yim rau txoj haujlwm no, tsuas yog cog lus rau nws.
Pom zoo:
Kev Tsim Qauv Duab Duab/Duab Duab Duab: 4 Kauj Ruam
Kev Tsim Qauv Duab Duab/Duab Duab Duab: Nyob zoo txhua tus, Hauv qhov kev qhia no, Kuv yuav qhia koj cov txheej txheem ntawm yuav ua li cas thiaj tsim 3D qauv siv cov duab digital. Cov txheej txheem hu ua Photogrammetry, tseem hu ua Image-Based Modeling (IBM). Tshwj xeeb, hom txheej txheem no tau siv los rov ua dua
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Tsis Siv Neeg Chaw Taws Teeb ON / OFF Siv MIC Jack ntawm Koj Lub Koob Yees Duab / Tsawg Voltage Solid State Relay: 4 Kauj Ruam (nrog Duab)
Tsis Siv Neeg Chaw Taws Teeb ON / OFF Siv MIC Jack ntawm Koj Lub Koob Yees Duab / Tsawg Voltage Solid State Relay: Txheej txheem cej luam: Peb tau siv MIC jack ntawm lub koob yees duab kom pom thaum lub koob yees duab nyob. Peb tau tsim cov khoom siv hluav taws xob tsawg hauv lub xeev kom pom lub MIC nkaus thiab qhib thiab kaw lub cuab yeej nyob deb tib lub sijhawm tib yam li lub koob yees duab. Lub xeev-solid