Cov txheej txheem:

BlindStore: 11 Kauj Ruam
BlindStore: 11 Kauj Ruam

Video: BlindStore: 11 Kauj Ruam

Video: BlindStore: 11 Kauj Ruam
Video: Khav khav tuag nplaig tsau av 11/3/2022 2024, Kaum ib hlis
Anonim
BlindStore
BlindStore

Txoj haujlwm yog hais txog kev tswj qhov muag tsis pom uas koj tuaj yeem siv hauv tsev ntawm tus nqi qis. Nws yuav hloov pauv rau txhua hom khw muag khoom ua tsaug rau nws lub log tsim tshwj xeeb. Koj yuav tuaj yeem kaw lossis qhib koj lub khw txhua qhov chaw hauv koj lub tsev ua tsaug rau koj lub khoos phis tawj lossis xov tooj nrog kev sib txuas wifi.

Kauj Ruam 1: Cov Npe Ntawm Cheeb Tsam Part.1

Nov yog cov khoom siv hluav taws xob uas peb yuav siv hauv peb txoj haujlwm:

· Raspberry Pi 3 B+ Cov khoom siv pib lub desktop --- 59 €

Raspberry Pi 3

· ESP 32 --- 7, 99 €

NPE 32

· DHT11 --- 1, 32 €

DHT11

· Kauj ruam lub cev muaj zog HANPOSE 17HS8401S --- 10 €

Cov kauj ruam tsav HANPOSE 17HS8401S

· Tsav Tsheb L298N --- 3, 40 €

L298N

· Transformer 12V, 3A --- 13, 12 €

Transmitter 12V

Tus nqi ntawm thawj lub thawv yog 94, 83 €. Lwm lub thawv yuav raug nqi 35, 83 € vim tias Raspberry twb tau yuav lawm. Qhov tseeb, Raspberry tau tuav tus neeg rau zaub mov thiab cuam tshuam txhua lub tsev tus qauv.

Kauj Ruam 2: Cov Npe Ntawm Cheeb Tsam Part.2

Daim Ntawv Teev Npe Cheeb Tsam Part.2
Daim Ntawv Teev Npe Cheeb Tsam Part.2
Daim Ntawv Teev Npe Cheeb Tsam Part.2
Daim Ntawv Teev Npe Cheeb Tsam Part.2

Txhawm rau tswj hwm txhua yam khoom siv hluav taws xob, koj yuav tsum luam tawm rooj plaub uas peb tau tsim. Cov ntaub ntawv no yuav tso cai rau peb sib sau tag nrho cov khoom siv hauv tib lub npov.

Koj yuav tsum luam tawm lub log uas txuas lub cav mus rau tus neeg dig muag txoj hlua.

Kauj Ruam 3: Hluav Taws Xob Hluav Taws Xob

Hauv Circuit Court
Hauv Circuit Court

Ua kom cov khoom siv hluav taws xob zoo li nws tau nthuav tawm ntawm cov txheej txheem saum toj no:

Them lub hom phiaj, roj teeb ntawm lub tswv yim sawv cev rau 12V lub zog siv.

Txhua lub zog siv hluav taws xob tau tswj hwm los ntawm L298N pawg thawj coj, 12V rau cov kauj ruam tsav thiab 5V rau ESP32.

Kauj Ruam 4: Sofware Part.1

Sofware Tshooj 1
Sofware Tshooj 1
Sofware Tshooj 1
Sofware Tshooj 1
Sofware Tshooj 1
Sofware Tshooj 1

Txhawm rau ua ib qho haujlwm twg ntawm ESP32 koj yuav tsum tau teeb tsa Arduino IDE thiab ob peb lub tsev qiv ntawv rau nws. Arduino yog software pub dawb uas yuav tso cai rau koj siv cov txheej txheem ntawm ESP32.

- Rub tawm thiab teeb tsa Arduino lub tswv yim.

- Ntawm Arduino IDE, xaiv "cov ntaub ntawv" tom ntej "nyiam" thiab thaum kawg sau rau hauv rooj plaub lub npe url:

- Xaiv "cov cuab yeej" - "Tus thawj coj tswj hwm" - tshawb "esp32" thiab teeb tsa lub tsev qiv ntawv.

- Xaiv "cov cuab yeej" - "tswj lub tsev qiv ntawv" - tshawb "DHT sensor" thiab teeb tsa lub tsev qiv ntawv

- Xaiv "cuab yeej" - "tswj lub tsev qiv ntawv" - tshawb "Stepper" thiab teeb tsa lub tsev qiv ntawv. Nws yog lub tsev qiv ntawv los tsav lub cav.

- Xaiv "cov cuab yeej" - "tswj lub tsev qiv ntawv" - tshawb "Hlau" thiab teeb tsa lub tsev qiv ntawv

- Rho tawm wifi.h hauv cov tsev qiv ntawv Arduino.

- Rub tawm cov ntawv ntawm

- Luam cov ntawv rub tawm hauv Arduino lub tsev qiv ntawv tais ceev tseg lub npe nws tsis muaj "tus tswv" thaum pib ntawm nws lub npe.

Kauj Ruam 5: Software Tshooj 2

PubSubClient lub tsev qiv ntawv tso cai rau koj ESP32 sib tham nrog Raspberry Pi3 ua tsaug rau Node-Red. Node-RED yog lub cuab yeej ua haujlwm raws JAVA uas yuav tso cai rau peb sib tham ntawm Raspberry, tus neeg siv thiab ESP32.

- Txhawm rau teeb tsa lub tsev qiv ntawv PubSubClient koj yuav tsum ua raws cov lus qhia hauv qab no:

- Nyem rau qhov no rub tawm PubSubClient lub tsev qiv ntawv

- Rub tawm PubSubClient lub tsev qiv ntawv ua tsaug rau qhov txuas saum toj no. Koj yuav tsum muaj.zip nplaub tshev hauv koj daim nplaub tshev Downloads

- Unzip lub.zip nplaub tshev thiab koj yuav tsum tau txais pubsubclient-master nplaub tshev

- Hloov koj daim nplaub tshev los ntawm pubsubclient-master rau pubsubclient

- Txav cov ntawv pubsubclient rau koj Arduino IDE teeb tsa lub tsev qiv ntawv tais ceev tseg

- Tom qab ntawv, rov qhib koj li Arduino IDE

Kauj Ruam 6: Software Tshooj 3

Software Tshooj 3
Software Tshooj 3
Software Tshooj 3
Software Tshooj 3
Software Tshooj 3
Software Tshooj 3

Kev xa tawm cov cai ntawm esp32.

Koj yuav tsum teeb tsa qhov ntsuas ntawm Arduino.

- Nyem rau ntawm “Cov Cuab Yeej”, “Tus Thawj Saib Xyuas Haujlwm” thiab xaiv “ESP32 Dev Module”.

- Nyem rau ntawm "Cov Cuab Yeej", "Upload Speed" thiab xaiv "115200".

- Thaum kawg, nyem rau ntawm "Cuab Yeej", koj yuav tsum xaiv qhov chaw nres nkoj USB raug los ntawm nyem rau ntawm qhov chaw nres nkoj.

Kauj Ruam 7: Software Tshooj 4

Software Tshooj 4
Software Tshooj 4

Tam sim no koj Arduino tau npaj los pib cov txheej txheem hauv qab no:

- Koj yuav tsum sau rau hauv 3 qhov ntsuas, lawv ua siab loj thiab qis dua hauv cov cai hauv qab no:

- Txhawm rau paub tus IP chaw nyob ntawm Raspberry Pi3, koj yuav tsum nkag mus rau LXT davhlau ya nyob twg ntawm Raspberry cov lus txib hauv qab no: hostname -I

- Lus ceeb toom: txhua zaus koj rov pib dua Raspberry, tus IP chaw nyob tuaj yeem hloov pauv thiab koj yuav tsum tau nkag mus rau tus IP tshiab.

const char* ssid = "Wifi_name"; // "Koj lub npe Wifi"

const char* password = "Wifi_password"; // "koj tus password"

const char* mqtt_server = "IP_adress"; // "IP chaw nyob ntawm Raspberry"

- Thaum lo lus "txuas" nthuav tawm ntawm lub vijtsam, koj yuav tsum nias lub pob khau raj ntawm Esp32.

Kauj Ruam 8: Software Tshooj 5

1) Cov kauj ruam tom ntej yog teeb tsa ntawm Node-Red ntawm LXT davhlau ya nyob twg ntawm Raspberry pi3 nrog cov lus txib:

- sudo apt hloov tshiab

-$ bash <(curl -sL

- sudo systemctl pab kom nodered.service

2) Kev teeb tsa Mosquitto rau MQTT kev cai, koj yuav tsum sau cov lus txib tom ntej hauv LXT davhlau ya nyob twg ntawm Raspberry Pi3.

- sudo rov pib dua

-sudo apt install -y mosquitto mosquitto -cov neeg siv khoom

- sudo systemctl pab kom mosquitto.service

3) Kev teeb tsa ntawm Node-Red dashboard, koj yuav tsum sau cov lus txib tom ntej hauv LXT davhlau ya nyob twg ntawm Raspberry Pi3.

-ntawm-liab-nres

- cd ~/.node-liab

-npm nruab node-red-dashboard

Kauj Ruam 9: Software Tshooj 6

Software Tshooj 6
Software Tshooj 6

Txhawm rau nkag mus rau Node Red ntawm koj Raspberry Pi3 koj sau ntawm lub davhlau ya nyob twg LXT cov lus txib tom ntej:

- Ua ntej, pib MQTT server los ntawm txhaj rau Node-Red icon ntawm koj li Raspberry

- Tus tswv tsev -I; ua tsaug rau qhov ntawd, koj tau txais IP chaw nyob ntawm koj li Raspberry

- Tom ntej no koj sau qhov url ntawm lub vev xaib: https:// Your_IP_adress: 1880

- Qee qhov thaiv tsis tuaj yeem nyeem tau, koj yuav tsum xaiv lub kaum sab xis ntawm cov ntawv qhia zaub mov, nyem tom ntej ntawm "ntshuam", tom ntej nyem rau ntawm "tsev qiv ntawv". Koj rub tawm "ui pab pawg" thiab "ui tab".

- Koj nyem rau ntawm "Ntawv qhia zaub mov", "ntshuam", "ntawv cia". Thiab tom qab ntawd koj theej cov cai hauv qab no hauv rooj plaub:

[{"id": "e1ac6b57.2f2978", "type": "tab", "label": "Flow 1", "disabled": tsis tseeb, "info": ""}, {"id": "8b42857c.b840b8 "," yam ":" mqtt tawm "," z ":" e1ac6b57.2f2978 "," npe ":" "," topic ":" esp32/output "," qos ":" "," khaws ": "", "broker": "aabbce3b.08ddc", "x": 1130, "y": 320, "xov tooj": }, {"id": "c35754db.b52628", "type": " ui_button "," z ":" e1ac6b57.2f2978 "," name ":" "," group ":" 99a9d1e9.00b5b "," order ": 1," width ": 0," height ": 0," passthru ": tsis tseeb," daim ntawv lo ":" Up "," tooltip ":" "," xim ":" "," bgcolor ":" "," icon ":" "," payload ":" on "," payloadType ":" str "," topic ":" "," x ": 780," y ": 300," Wire ":

- Tso tsheb hlau luam rau txoj cai, koj tau txais cov duab nraaj ntawm Node-liab

Kauj Ruam 10: Software Tshooj 7

Software Tshooj 7
Software Tshooj 7

Kev sib txuas rau daim ntawv thov

- Koj tuaj yeem nkag mus rau koj daim ntawv thov los ntawm kev txuas koj lub xov tooj lossis koj lub computer ntawm tib Wifi ntawm Raspberry thiab Esp32. Tom qab ntawd nkag mus rau qhov chaw nyob hauv qab no rau hauv web browser: https:// Your_IP_adress_of_Raspberry: 1880/ui

- Koj yuav tsum muaj qee yam zoo li daim duab saum toj no

Kauj ruam 11: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Thaum tag nrho cov kauj ruam dhau los tau ua, koj tau npaj tso cov khoom siv hluav taws xob sab hauv lub thawv.

Yog tias cov kev sib txuas ua tau zoo, ntsia tag nrho cov khoom siv hauv qab no:

1. ESP 32

2. Lub qhov ntsaws ntsaws rau lub tshuab hloov pauv

3. DHT11

4. Tus L298N

5. Cov kauj ruam tsav

Thaum kawg, muab lub log rau ntawm lub cav lub cev, teeb lub thawv rau ntawm phab ntsa (hlua txoj hlua qhov muag tsis pom) thiab txaus siab rau peb qhov muag tsis pom txuas.

Pom zoo: