Cov txheej txheem:
- Kauj Ruam 1: Txhim Kho Pob
- Kauj Ruam 2: Pib Node-Liab thawj zaug
- Kauj Ruam 3: Nkag Mus Rau Hauv Web Page
- Kauj Ruam 4: Txhim Kho Dashboard Module rau GPIO
- Kauj Ruam 5: Tsim Dashboard rau GPIO
- Kauj ruam 6: Configuring Switch
- Kauj Ruam 7: Kho lub Slider
- Kauj ruam 8: Tua tawm UI thiab Xeem
Video: Node Liab - Tswj RaspberryPi: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv cov lus qhia no peb yuav saib yuav teeb tsa Node-Red software li cas thiab yuav tswj hwm GPIO ntawm koj li raspberry pi li cas yooj yim.
Kauj Ruam 1: Txhim Kho Pob
Ua ntej peb yuav tsum teeb tsa pob khoom. Txhawm rau ua qhov no koj yuav tsum tau muab cov lus txib hauv qab no hauv lub davhlau ya nyob twg:
pi@raspberrypi: ~ $ sudo apt-tau hloov tshiab
pi@raspberrypi: ~ $ sudo apt-get install build-essential sej-rpi.gpio
(yog tias khiav stretch rasbian nws yuav tsum tau teeb tsa.)
pi@raspberrypi: ~ $ bash <(curl -sL
Kauj Ruam 2: Pib Node-Liab thawj zaug
Txhawm rau pib Node-Liab koj tsuas yog xav tau los ua lub davhlau ya nyob twg hais kom ua: pi@raspberrypi: ~ $ node-red-start
Txhawm rau pib dua Node-Red thaum lub khau khau khau koj tsuas xav tau los pab cov kev pabcuam nrog cov lus txib hauv qab no:
pi@raspberrypi: ~ $ sudo systemctl pab kom nodered.service
Kauj Ruam 3: Nkag Mus Rau Hauv Web Page
Tam sim no koj tsuas xav tau nkag mus rau lub vev xaib uas tam sim no tau khiav ntawm koj li raspberry pi rau Node-Red kev txhim kho.
Txhawm rau ua qhov no koj tsuas yog yuav tsum mus rau koj tus pi chaw nyob thiab siv chaw nres nkoj 1880.
Piv txwv:
Yog tias kuv tus pi chaw nyob yog 192.168.1.40 ces kuv yuav nkag mus siv
Kauj Ruam 4: Txhim Kho Dashboard Module rau GPIO
Tam sim no peb yuav saib tsim lub dashboard rau koj tswj hwm GPIO. Ua ntej peb yuav tsum tau teeb tsa lub dashboard tivthaiv.
Ua cov lus txib hauv qab no hauv lub davhlau ya nyob twg ntawm koj tus pi:
pi@raspberrypi: ~ $ node-red-stop
pi@raspberrypi: ~ $ cd ~/.node-red pi@raspberrypi: ~ $ npm nruab node-red-dashboard pi@raspberrypi: ~ $ node-red-start
Kauj Ruam 5: Tsim Dashboard rau GPIO
Tam sim no koj yuav tsum rov qab mus rau nplooj ntawv browser uas koj tau mus rau ua ntej hauv qhov haujlwm no.
Los ntawm nplooj ntawv no peb yuav tsim ib qho piv txwv ntawm GPIO. Kuv yuav tso qhov hloov pauv thiab ib qho swb rau tig GPIO rau thiab tawm thiab ib qho rau kev ua haujlwm pwm nthwv dej.
Koj yuav tsum tau nrhiav, los ntawm sab laug ntawm lub vaj huam sib luag hauv qab dashboard, khawm hloov thiab rub nws mus rau Flow 1. Tom qab ntawd koj yuav tsum nrhiav tus swb thiab rub nws mus rau Flow 1 ib yam.
Tam sim no koj yuav tsum nrhiav GPIO nyob rau hauv seem raspberry pi. Tam sim no koj xav tau gpio module uas muaj qhov txuas sib txuas ntawm sab laug txij li qhov no yog cov qauv siv. Luag ob qho ntawm qhov no mus rau Flow 1 hla ntawm qhov hloov pauv thiab swb.
Cias tso koj tus cursor ntawm qhov txuas ntawm sab laug ntawm qhov hloov pauv thiab nyem thiab rub mus rau qhov txuas txuas ntawm sab laug ntawm ib qho ntawm GPIO pins. Ua tib yam rau tus swb.
Thaum txuas nrog koj yuav tsum teeb tsa txhua daim los ntawm ob npaug nyem rau lawv.
Kauj ruam 6: Configuring Switch
Ob npaug nias rau ntawm qhov hloov pauv thiab qhib cov khoom ntawv qhia zaub mov.
Ntawm no koj yuav tsum nyem qhov xaum ntawm sab xis ntawm pab pawg.
Tam sim no tsim cov pab pawg tshiab lub npe (Kuv tso kuv tus kheej rau lub neej ntawd)
Xaiv tus xaum cim lub cim nyob ib sab ntawm TAB thiab npe lub rooj koj xav kom qhov no yog ib feem ntawm (Kuv tau xaiv tsev)
Tam sim no xaiv hloov tshiab nyob rau sab xis saum toj.
Tam sim no koj tuaj yeem xaiv koj qhov loj thiab teeb tsa ntawm koj qhov kev hloov pauv. Thaum koj tau txais lub cim koj xav siv thiab txhua yam tshuaj pleev ib ce tiav koj yuav nqis mus rau qhov kev xaiv them nyiaj.
Rau kev hloov pauv koj yuav tsum teeb tsa cov kev xaiv them nyiaj raws li hauv qab no:
Xaiv qhov nco cia nyob ib sab ntawm lub thawv ntawv them nyiaj thiab xaiv tus lej rau ob qho kev them nyiaj ces teeb:
Them Nyiaj: 1
Tsis Them Nyiaj: 0
Tam sim no koj yuav tsum teeb tsa GPIO tus pin uas koj xav hloov.
Ob npaug nias rau tus pin rau qhov hloov pauv thiab qhov no yuav qhib qhov hloov rpi-gpio tawm hom.
Xaiv tus pin koj xav siv, hauv peb qhov xwm txheej peb siv GPIO04-7 tus pin.
Muab nws lub npe yog tias koj xav tau thiab xaiv "Ua"
Kauj Ruam 7: Kho lub Slider
Txhawm rau teeb tsa tus slider koj yuav tsum xub nyem ob zaug ntawm lub pob nyem slider dashboard.
Thaum nyob ntawd koj yuav hloov cov khoom "ntawv cim" rau yam koj xav kom nws lub npe nyob hauv UI.
Tom ntej no koj yuav teeb tsa yam tsawg kawg nkaus thiab qhov ntau kawg. Txij li PWM LED qhov ci ci nyob rau hauv feem pua feem ntau, vim yog %Duty Cycle, peb xav tau yam tsawg kawg yog 0 thiab qhov siab tshaj plaws yog 100.
Tam sim no rau peb tus piv txwv yuav ua li cas txhoj puab heev lub teeb hloov ci ntsa iab yog los ntawm cov kauj ruam. Kuv muaj peb teeb tsa rau 1 rau ib kauj ruam yog li 1 chav ntawm cov swb yog sib npaug rau 1% ci ntsa iab.
Qhov ntawd yog nws rau tus swb
Rau tus Pin koj yuav xav tau ob npaug nias qhov cuam tshuam nrog GPIO tus lej cim.
Tam sim no rau rus peb xaiv GPIO18 tus pin vim qhov no yog PMW tus pin rau Raspberry pi 3 B+
Tom qab ntawd koj yuav tsum xaiv PWM tso tawm hauv hom teb kom nws paub tias nws yog PWM tso tawm.
Muab nws lub npe thiab koj tau npaj mus.
Kauj ruam 8: Tua tawm UI thiab Xeem
Tam sim no txhawm rau sim tawm koj lub dashboard UI tshiab koj yuav tsum tau nyem rau ntawm lub kaum sab xis saum toj kom siv koj li kev cai. Tom qab ntawd koj yuav tsum mus rau IP chaw nyob ntawm koj tus pi uas yog runnin node-red. Thiab tshaj qhov UI xaiv rau nws piv txwv: https://192.168.1.31:1880/ui Yam koj yuav tsum pom yog koj hloov thiab koj tus swb uas koj tau tsim. Tam sim no koj tuaj yeem sim los ntawm txhaj rau txhua tus Kuv vam tias koj tau txaus siab rau Cov Lus Qhia no thiab thov txheeb xyuas hauv youtube channel thiab cov vis dis aus rau lwm cov ntaub ntawv.
Pom zoo:
UCL-IIOT-Tswb System Nrog Database thiab Node-liab: 7 Kauj Ruam
UCL-IIOT-Tswb System Nrog Database thiab Node-red: Lub hom phiaj ntawm qhov kev tsim no yog los qhia txog kev txuas Arduino nrog Node-liab thiab lub hauv paus, yog li koj tuaj yeem teev cov ntaub ntawv thiab tseem khaws nws rau tom qab siv. Rau qhov kev tsim no kuv siv ib qho yooj yim arduino lub tswb kaw lus uas tso tawm 5 tus lej xov tooj, txhua qhov cais nrog
Tsim Email Ceeb Toom Ntawm NCD Wireless Kub thiab Vaum Sensor Siv Node-Liab: 22 Cov Kauj Ruam
Tsim Email Ceeb Toom Ntawm NCD Wireless Kub thiab Vaum Sensor Siv Node-Liab: Peb tab tom siv NCD Qhov Kub thiab Vaum qhov ntsuas, tab sis cov kauj ruam nyob sib npaug rau ib qho ntawm cov khoom ncd, yog li yog tias koj muaj lwm yam ncd wireless sensors, muaj kev paub pub dawb rau saib ib sab ntxiv. Los ntawm kev nres ntawm cov ntawv no, koj yuav tsum
IOT Ntev Ntau Yam Wireless Kub thiab Vaum Sensor Nrog Node-Liab: 27 Cov Kauj Ruam
IOT Ntev Ntau Yam Wireless Kub thiab Vaum Sensor Nrog Node-Liab: Qhia NCD qhov ntev-ntau wireless wireless-huab cua ntsuas huab cua, khav txog li 28 Mile ntau yam siv wireless mesh networking architecture. Kev koom tes nrog Honeywell HIH9130 qhov ntsuas kub thiab av noo xa tawm qhov ntsuas kub tau raug thiab
UCL - Txuas Node -liab mus rau Siemens PLC Siv KEPserver: 7 Cov Kauj Ruam
UCL-Txuas Node-liab mus rau Siemens PLC Siv KEPserver: Yuav Tsum Tau Node-liab: https://nodered.org/docs/getting-started/installationKEPserver: https://www.kepware.com/en-us/kepserverex-6 -6-tso tawm
Hnub Timer Siv Node Liab Nrog Nco Ntsoov: 6 Kauj Ruam
Hnub Timer Siv Node Liab Nrog Lub Cim Tseem Ceeb: Kuv nthuav dav siv Node-liab rau kuv cov haujlwm hauv Tsev Automation. Kuv tsis yog prgrammer los ntawm kev kawm tiav, tab sis nrog kev pab los ntawm ntau tus koom tes kuv sim teeb tsa yam khoom raws li kuv xav tau. Qee zaum nws ua haujlwm thiab qee zaum nws tsis ua :) Rau ib qho