Cov txheej txheem:
- Kauj Ruam 1: Cheeb Tsam
- Kauj Ruam 2: Sau Rasbian ntawm Micro SD Card
- Kauj ruam 3: Ntxiv Ip thiab Pab kom SSH
- Kauj Ruam 4: Pib Nrog Putty
- Kauj Ruam 5: Raspberry Pi Pib
- Kauj Ruam 6: Txuas rau Wi-nkaus thiab Hloov Kho Raspberry Pi
- Kauj Ruam 7: Pab kom SPI thiab 1-xaim
- Kauj Ruam 8: Tsim Lub Tsev Khaub Ncaws Ntse Ntsej Muag thiab Rub Tawm Txhua Pob Khoom Tsim Nyog
- Kauj Ruam 9: Uploade Code ntawm Raspberry Pi
- Kauj ruam 10: Tsim Database
- Kauj ruam 11: Tsis Siv Neeg Pib ntawm Cov Ntawv
- Kauj Ruam 12: Tsim Tsev Cog Khoom
Video: Tsev Cog Khoom Ntse: 12 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Koj puas tau muaj teeb meem tias nws kub dhau hauv koj lub tsev cog khoom, yog li tag nrho koj cov nroj tsuag tuag, vim tias koj tsis nco qab qhib lub qhov cua?
Saib tsis muaj ntxiv, lub tsev cog khoom ntse yog qhov kev daws teeb meem no.
Ua raws cov kauj ruam taug kev koj los ntawm kev tsim koj li Tsev Cog Khoom Ntse lossis hloov koj lub tsev cog khoom mus rau Lub Tsev Cog Khoom Ntse.
Kauj Ruam 1: Cheeb Tsam
Cheebtsam:
1 x Servo tsav
2 x Kev ntsuas kub
1 xf fan
2 x av noo sensor
2 x lub teeb sensor
8 x coj dawb
ntau yam resistors
1 x 4 los ntawm 7-ntu zaub
1 x MCP3008
1 x74c595
1 x Relais
1 x raspberry pi 3 qauv b
Cov qhob cij
jumpercables
lub tsev cog khoom me me
Kauj Ruam 2: Sau Rasbian ntawm Micro SD Card
- Rub tawm qhov tseeb version "rasbian stretch with desktop" los ntawm qhov chaw:
- Unzip cov ntaub ntawv raspbian.
- Rub tawm qhov hloov tshiab kawg thiab lwm qhov los ntawm qhov chaw ntawd:
- Hloov kho 32GB micro SD daim npav.
- Qhib echter, xaiv rasbian img thiab koj daim npav micro SD.
- Nyem rau nyem.
Kauj ruam 3: Ntxiv Ip thiab Pab kom SSH
- Ntxiv cov ntawv "ssh" rau hauv daim npav micro SD.
- Nrhiav cov ntawv "cmdline.txt" thiab qhib nws.
- Ntxiv "ip = 169.254.10.1" thaum kawg.
- Ntxig daim npav micro SD hauv kuv Raspberry Pi thiab muab lub zog rau nws.
- Txuas lub Raspberry Pi nrog lub ethernet cable rau koj lub PC.
Kauj Ruam 4: Pib Nrog Putty
- Rub tawm qhov tseeb version "rasbian stretch with desktop" los ntawm qhov chaw:
-
Qhib putty thiab sau cov ntsiab lus hauv qab no:
- HostName (lossis IP chaw nyob): 169.254.10.1
- Hom kev sib txuas: SSH
- Txuag Sijhawm: Smart_Greenhouse
- Nyem rau "Txuag"
- Nyem rau "Qhib"
- Yog tias koj tau txais kev ceeb toom kev nyab xeeb los ntawm putty, nyem "Yog".
Kauj Ruam 5: Raspberry Pi Pib
-
Defealt cedentials yog:
- username: pib
- lo lus zais: raspberry
- Hloov tus password tsis raug los ntawm kev hais kom ua "passwd" thiab nkag mus
- Ntaus thawj lo lus zais tam sim no raspberry thiab tom qab ntawd ob zaug koj tus password tshiab uas koj xaiv.
Kauj Ruam 6: Txuas rau Wi-nkaus thiab Hloov Kho Raspberry Pi
- Hom: sudo -i
- Hom: echo "password" | wpa_passphrase “SSID” >> /etc/wpa_supplicant/wpa_supplicant.conf
- Hloov tus password rau tus password ntawm koj lub wifi thiab SSID rau lub npe ntawm koj lub wifi.
- Txhawm rau txheeb xyuas hom: nano /etc/wpa_supplicant/wpa_supplicant.conf
-
Yuav tsum muaj qee yam hauv cov ntawv no uas zoo li daim duab saum toj no. Siv "Ctrl" + "X" kom tawm cov ntawv.
- Hom: systemctl rov pib dua kev sib tham
- Hom: systemctl xwm txheej sib tham
- Hom: rov pib dua
- Tos 30 vib nas this, rov pib dua, nyem "Smart_Greenhouse" thiab nyem "Qhib"
- Nkag mus ntxiv
- Hom: ping 8.8.8.8
- Tom qab cov lus txib no, yuav tsum muaj qee yam uas zoo li cov duab saum toj no.
- Hom: sudo apt-tau hloov tshiab && sudo apt-tau hloov kho -y qhov no tuaj yeem siv sijhawm me ntsis los hloov kho.
Kauj Ruam 7: Pab kom SPI thiab 1-xaim
- Hom: sudo raspi-teeb tsa
- Xaiv "Interface Options"
- Xaiv "SPI", hais "Yog" thiab hais "Ok"
- Xaiv "Interface Options"
- Xaiv "1-xaim", hais "Yog" thiab hais "Ok"
- Xaiv "Finish"
- Hom: sudo reboot
- Tos 30 vib nas this, rov pib dua, nyem "Smart_Greenhouse" thiab nyem "Qhib"
Kauj Ruam 8: Tsim Lub Tsev Khaub Ncaws Ntse Ntsej Muag thiab Rub Tawm Txhua Pob Khoom Tsim Nyog
- Hom: sudo apt hloov tshiab
- Hom: sudo apt install -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3
- Hom: mkdir Smart_Greenhouse && cd Smart_Greenhouse
- Hom: mkdir Smart_Greenhouse_frontend && cd Smart_Greenhouse_frontend
- Hom: python3 -m venv-system-site-packages env
- Hom: qhov chaw env/bin/qhib
- Hom: nab hab sej -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib
-
Hom: sudo reboot
- Tos 30 vib nas this, rov pib dua, nyem "Smart_Greenhouse" thiab nyem "Qhib"
- Hom: cd Smart_Greenhouse
- Hom: mkdir Smart_Greenhouse_backend && cd Smart_Greenhouse_backend
- Hom: python3 -m venv-system-site-packages env
- Hom: qhov chaw env/bin/qhib
- Hom: nab hab sej -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib
- Hom: sudo reboot
- Tos 30 vib nas this, rov pib dua, nyem "Smart_Greenhouse" thiab nyem "Qhib"
Kauj Ruam 9: Uploade Code ntawm Raspberry Pi
- Rub tawm cov ntawv thov tshiab filezilla los ntawm qhov chaw ntawd:
- Rub tus lej los ntawm github:
-
Pib fillezilla thiab sau cov ntsiab lus hauv qab no:
- Tus tswv tsev: 169.254.10.1
- Username: pib
- Lo lus zais: "tus password koj tau xaiv ntawm Raspberry Pi"
- Chaw nres nkoj: 22
- Nyem txuas
- Nyob rau sab laug "qhov chaw hauv zos" mus rau cov ntaub ntawv koj rub tawm los ntawm github
- Nyob rau sab xis "qhov chaw tsis txaus ntseeg" mus rau Smart_Greenhouse nplaub tshev
- Luag cov ntawv "conf" thiab "sql" mus rau Smart_Greenhouse nplaub tshev
- Qhib Smart_Greenhouse_backend hauv ob sab thiab rub "qauv" thiab "main.py" los ntawm sab laug mus rau sab xis
- Rov qab mus rau daim nplaub tshev yav dhau los ntawm ob sab
- Qhib Smart_Greenhouse_frontend hauv ob sab thiab rub "zoo li qub", "qauv" thiab "app.py" los ntawm sab laug mus rau sab xis
- Nws yuav tsum zoo li daim duab saum toj no.
Kauj ruam 10: Tsim Database
- Pib putty thiab nkag mus
- Hom: cd Smart_Greenhouse/
- Hom: sudo mariadb
- Hom: CREATE USER 'project1-admin'@'localhost' IDENTIFIED BY 'admin'; Tsim tus neeg siv 'project1-web'@'localhost' IDENTIFIED BY 'web'; Tsim tus neeg siv 'project1-sensor'@'localhost' IDENTIFIED BY 'sensor';
-
Hom: CREATE DATABASE smartgreenhousedb;
- Hom: ZOO TSHAJ PLAWS YOOJ YIM RAU smartgreenhousedb.* Rau 'project1-admin'@'localhost' NROG QHOV ZOO TSHAJ PLAWS; GRANT SELECT, INSERT, Hloov tshiab, Rho tawm ntawm smartgreenhousedb.* TO 'project1-web'@'localhost'; GRANT SELECT, INSERT, Hloov tshiab, Rho tawm ntawm smartgreenhousedb.* TO 'project1-sensor'@'localhost'; NTSEEG NTAWV QHOV TSEEB;
- Hom: qhia databases;
- Nws yuav tsum zoo li daim duab saum toj no.
- Hom: tawm;
- Hom: sudo mariadb <sql/smartgreenhousedb.sql
- Hom: sudo mariadb
- Hom: siv smartgreenhousedb;
- Hom: qhia cov ntxhuav;
- Hom: tawm;
Kauj ruam 11: Tsis Siv Neeg Pib ntawm Cov Ntawv
- Hom: sudo cp conf/project1-*. Service/etc/systemd/system/
- Hom: sudo systemctl daemon-reload
- Hom: sudo systemctl pib qhov project1-*
- Hom: sudo systemctl xwm txheej project1-*
- Hom: sudo cp conf/nginx/etc/nginx/sites-available/project1
- Hom: sudo rm/etc/nginx/sites-enabled/default
- Hom: sudo ln -s/etc/nginx/sites-available/project1/etc/nginx/sites-enabled/project1
- Hom: sudo systemctl rov pib dua nginx.service
- Hom: sudo systemctl xwm txheej nginx.service
- Hom: sudo systemctl pab kom project1-flask
- Hom: sudo systemctl pab kom project1-sensor
- Nws yuav tsum zoo li daim duab saum toj no.
Kauj Ruam 12: Tsim Tsev Cog Khoom
- Ua lub tsev cog khoom.
- Ntxiv tag nrho cov khoom siv rau lub tsev cog khoom raws li daim duab hluav taws xob.
- Ntxiv zog thiab txaus siab.
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev -- Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: 4 Cov Kauj Ruam
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev || Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: Nov Yog Qhov Tuchless Hloov Rau Cov Khoom Siv Hauv Tsev. Koj Siv Tau Qhov No Mus Rau Txhua Qhov Chaw Hauv Pej Xeem Kom Pab Tau Tawm Tsam Ib Yam Kab Mob. Lub Circuit Court Raws Li Tsaus Sensor Circuit Ua Los Ntawm Op-Amp Thiab LDR. Qhov Tseem Ceeb Thib Ob Ntawm Qhov Circuit Court SR Flip-Flop Nrog Sequencell
IGreenhouse - Tsev cog khoom ntse: 17 Cov kauj ruam (nrog Duab)
IGreenhouse - Tsev cog khoom ntse: Cov txiv hmab txiv ntoo thiab zaub hauv tsev feem ntau zoo dua li cov uas koj yuav, tab sis qee zaum koj tuaj yeem plam qhov pom ntawm koj lub tsev cog khoom. Hauv txoj haujlwm no peb yuav ua lub tsev cog khoom ntse. Lub tsev cog khoom no yuav qhib thiab kaw nws lub qhov rais thiab qhov rooj
Cov cog cog zoo tshaj - Cov cog cog uas ntse tshaj plaws uas koj tau pom dua: 6 kauj ruam
Cov cog cog zoo tshaj plaws - Cov cog cog uas ntse tshaj plaws uas koj tau pom dua: Cov cog ntoo no tej zaum yog ib tus cog cog uas koj pom tshaj plaws. Txhua yam nyob hauv nws lub ntsej muag zoo nkauj thiab niaj hnub tsim, tus cog ntoo no khav theeb av uas pom thaum koj cov av qhuav. Thaum nws qhuav, lub twj tso kua mis peristaltic tig rau thiab txiav dej
Lub Tsev Cog Khoom Hauv Tsev (RAS): Saib Xyuas Cov Txheej Txheem Los Ua Haujlwm ntawm Peb Cov Nroj Tsuag: 18 Kauj Ruam (nrog Duab)
Lub Tsev Cog Khoom Hauv Tsev (RAS): Saib Xyuas Cov Txheej Txheem Kom Ua Kom Zoo Rau Peb Cov Nroj Tsuag: Txoj haujlwm no tawm tswv yim los saib xyuas huab cua kub, qhov ci thiab av noo, ntxiv rau qhov kub thiab txias hauv hav zoov. Nws tawm tswv yim dhau los txhawm rau txheeb xyuas cov kev ntsuas no uas nyeem tau zoo ntawm lub vev xaib Actoborad.com Txhawm rau ua, peb txuas 4 lub ntsuas pa rau N