Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Teeb tsa Raspberry Pi
- Kauj ruam 2: Tsim Circuit Court
- Kauj Ruam 3: Tsim Rooj Plaub
- Kauj ruam 4: Txoj Cai
- Kauj ruam 5: Teem Up Database
- Kauj Ruam 6: Saib Cov Nroj Tsuag Loj Hlob
Video: Cog kuv: 6 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Raws li feem ntau ua, Kuv nyiam muaj cov ntoo nyob ib ncig ntawm lub tsev. Hmoov tsis zoo, lawv yuav luag tas li tuag hauv ob peb lub lis piam. Yog li thaum qhov kawg ntawm kuv thawj xyoo ua tub ntxhais kawm ntawm MCT ntawm Howest Kuv tau ua lub luag haujlwm los tsim txoj haujlwm uas yuav qhia txhua yam uas kuv tau kawm txog tam sim no, Kuv xav ua qee yam uas yuav txo cov nroj tsuag tuag nyob ib ncig ntawm lub tsev. Thiab yog li Plant'm tau yug los.
Kuv tig rov qab mus rau kuv cov nroj tsuag yav dhau los thiab sim xav txog ntau yam laj thawj uas lawv tsis muaj sia nyob. Feem ntau qhov no yog vim kuv tsis nco qab ywg dej rau lawv, ywg dej ntau dhau, lossis tsis txhob cia lawv pom qhov kaj ntawm ib hnub. Nov yog qhov chaw Plant'm nqis tes ua thiab saib xyuas cov khoom no rau koj.
Khoom siv
Electronics:
- Raspberry pi 4 + GPIO tawg
- SD daim npav 16 GB lossis ntau dua
- Ua kua theem sensor
- LM35
- Av noo noo sensor
- LDR
- Kev hloov pauv (BC337)
- Dej twj
- LED sawb
- Breadboard + fais fab mov
- LCD zaub
- Muaj ntau lub jumper cables ob leeg txiv neej-txiv neej thiab poj niam-txiv neej
Khoom siv
- Cov cawv txiv hmab qub
- Qub rooj teeb
- Ntsia hlau thiab ntsia liaj qhov rooj
- Hinges
- Ntsia
- Kua nplaum thiab kab xev
Kauj Ruam 1: Teeb tsa Raspberry Pi
Koj tuaj yeem rub tawm cov duab xav tau rau Pi ntawm no. Kuv feem ntau xaiv qhov tsis muaj lub desktop vim kuv tsuas txuas rau Pi los ntawm PuTTY. Thaum koj tau sau daim duab rau SD daim npav, koj yuav tsum hloov pauv thiab ntxiv qee cov ntaub ntawv. Hauv cov ntawv "cmdline.txt" (tsis txhob qhib cov ntawv no hauv notepad, qhib nws hauv Notepad ++ lossis lwm yam IDE) koj yuav tsum ntxiv "ip = 169.254.10.1" thaum kawg. Qhov no yuav ua kom ntseeg tau tias koj tuaj yeem txuas rau peb lub cuab yeej hla ethernet (nco ntsoov tias koj tsis ntxiv ENTERS thaum kawg ntawm koj cov ntaub ntawv lossis koj yuav muaj teeb meem).
Tam sim no koj tuaj yeem ntxig daim npav SD, txuas Pi rau koj lub khoos phis tawj ntawm ethernet thiab khau raj Pi. Nws tuaj yeem siv sijhawm me ntsis rau Pi pib thawj zaug. Thaum koj tuaj yeem nkag mus rau qhov ntawd nrog tus neeg siv tsis raug "pi" nrog nws tus password "raspberry". Koj tuaj yeem hloov qhov no tom qab.
Ua ntej koj yuav tau hloov qee qhov kev teeb tsa. Siv "sudo raspi-config" los qhib cov ntawv qhia zaub mov teeb tsa thiab hauv no peb yuav mus rau Kev Xaiv Kev cuam tshuam. Hauv qab no peb yuav hloov qhov kev xaiv hauv qab no ntawm SPI.
Tam sim no koj tuaj yeem teeb tsa kev sib txuas wireless raws li tau piav qhia ntawm no. Tam sim no peb muaj kev sib txuas hauv is taws nem peb tuaj yeem rub tawm qee pob khoom raws li hauv qab no:
- "sudo apt hloov tshiab && apt upgrade -y" Qhov no yuav tau txais qhov hloov tshiab kawg rau Pi.
- "sudo apt install mariadb-server apache2" Cov no yuav ua haujlwm webserver thiab database feem.
- "sudo pip3 install Flask Flask-Cors Flask-SocketIO gevent gevent-websocket greenlet spi SPI-Pyspidev" Cov no yog qee cov sej pob uas xav tau los ua haujlwm rov qab rau txoj haujlwm no.
- Thiab thaum kawg "sudo apt install python3 -mysql.connector -y" txuas rau lub database
Tom ntej no peb yuav tsim tus neeg siv ntawm lub database. Siv "sudo mysql -u root" txhawm rau nkag mus rau hauv koj li MySQL server, nyob ntawm no peb yuav tsim ib tus neeg siv hu ua db_admin nrog nws tus lej nkag mus, khaws tus password no sau tseg rau lwm qhov tom qab hauv cov lus qhia. "@"%"IDENTIFIED BY" yourPasswordHere "Nrog rau kev xaiv zoo Tam sim no koj tuaj yeem mus ntsib lub vev xaib ntawm tus IP chaw nyob peb tau ntxiv ua ntej.
Kauj ruam 2: Tsim Circuit Court
Txhawm rau tsim lub voj voog koj tuaj yeem ua raws nrog siv cov txheej txheem thiab daim ntawv qhia zaub mov ntxiv nrog lwm cov duab.
Kauj Ruam 3: Tsim Rooj Plaub
Cov ntaub ntawv no yog ua los ntawm 4 lub thawv cawv qub, 3 ntawm uas tau tawg sib nrug. Kuv drilled qee qhov hauv rooj plaub tseem ceeb txhawm rau txuas cov zaub, teeb, txuas txuas txuas, thiab ntsuas kub los ntawm.
Siv qee qhov khawm, Kuv txuas 2 lub hau. Ib qho los muab kev nkag mus rau cov chaw tso dej. Hauv lwm qhov, Kuv txiav tawm lub qhov rau kuv cov nroj tsuag kom loj tuaj, thiab 2 qhov ntxiv rau lub teeb pom kev kom dhau mus. Nws kuj muaj qhov txiav tawm rau lub teeb.
Txhawm rau kom cov khoom siv hluav taws xob cais los ntawm dej, Kuv tsim qib thib ob rau cov dej tso dej kom zaum ntawm siv lwm tus ntoo thiab 4 ntsia hlau thiab ntsia hlau. Kuv txiav qee qhov ntxiv hauv qhov no rau cov thaiv thiab muab qee chav ntxiv kom dhau lub teeb.
Raws li lub hauv paus rau lub teeb, Kuv siv lub teeb rooj qub uas tsis ua haujlwm ntxiv lawm. Kuv tshem tag nrho cov ntu sab hauv vim tias lawv tsis xav tau ntxiv lawm. Tom qab ntawd kuv tau muab tso rau hauv qhov chaw ntawm cov hlua coj thiab txuas 2 lub raj hlau nrog qee qhov PVC tubing thiab muaj cov kua nplaum ntau.
Kauj ruam 4: Txoj Cai
Koj tuaj yeem pom cov cai ntawm no. Tsuas yog rub tawm nws.
Tam sim no mus rau tso cov ntaub ntawv. Luam tag nrho cov ntaub ntawv hauv "Code/Frontend" nplaub tshev rau hauv "/var/www/html" ntawm Pi. Cov no yog cov ntaub ntawv rau lub vev xaib. Yuav muaj feem ntau yuav yog cov ntaub ntawv hu ua "index.html" hauv daim nplaub tshev no, koj tuaj yeem tshem tawm qhov ntawd. Cov ntaub ntawv hauv "Backend" nplaub tshev tuaj yeem tso rau hauv daim nplaub tshev tshiab hauv "home/pi" directory. Koj yuav tsum tau siv koj tus kheej tus lej cim thiab cov npe siv hauv "config.py".
Txhawm rau kom nws pib thaum koj ntsaws rau hauv, peb yuav tsum tau ua nws qhov kev pabcuam. Koj tuaj yeem kawm paub teeb tsa cov kev pabcuam ntawm no. Koj yuav tsum tsim cov ntawv hauv daim nplaub tshev "/etc/systemd/system". Hauv daim ntawv no theej thiab luam cov hauv qab no:
[Chav]
Nqe lus piav = Plant'm
Tom qab = network.target
[Kev pabcuam]
ExecStart =/usr/bin/python3 -u app.py
WorkingDirectory =/home/ine/project1
StandardOutput = qub txeeg qub teg
StandardError = qub txeeg qub teg
Rov pib dua = ib txwm
User = ib
[Nruab]
WantedBy = ntau-user.target
Koj yuav tsum tau hloov Chaw Ua Haujlwm Cov Ntaub Ntawv mus rau qhov chaw uas koj khaws cov ntaub ntawv backend thiab cov neeg siv rau koj tus kheej lub npe siv. Thaum koj tau ua tiav uas siv "sudo systemctl pib myscript.service" los ntsuas seb qhov kev pabcuam ua haujlwm li cas. Yog tias nws ntaus "sudo systemctl pab kom myscript.service" kom nws pib cia li pib dua.
Kauj ruam 5: Teem Up Database
Txog qhov no, peb yuav siv MySQL Workbench. Pib tawm koj yuav tsim kev sib txuas tshiab rau pi. Koj tuaj yeem pom kuv cov kev teeb tsa hauv qhov screenshot nrog. Tsuas yog tsis txhob hnov qab siv koj tus kheej lub npe siv thiab tus lej zais. Thaum koj tau ua tiav hauv qhov chaw nias "Test txuas" kom paub tseeb tias nws ua haujlwm.
Thaum qhov kev txuas tau ua tiav, mus tom ntej thiab txuas. Tam sim no peb yuav siv cov ntawv hauv "Database-export" nplaub tshev. Qhib cov ntaub ntawv SQL thiab khiav nws. Qhov no yuav tsim cov ntaub ntawv thiab tag nrho nws cov ntxhuav. Kuv kuj tau ntxiv hauv qee cov ntaub ntawv xeem kom pom hauv lub vev xaib.
Kauj Ruam 6: Saib Cov Nroj Tsuag Loj Hlob
Nrog txhua yam ua tiav, tam sim no peb muaj txoj haujlwm ua haujlwm uas yuav saib xyuas peb cov nroj tsuag.
Yog tias koj ntsib teeb meem, muaj lus nug lossis lus qhia, tsis txhob tawm lus. Kuv yuav sim rov qab los rau koj sai li kuv tuaj yeem ua tau.
Pom zoo:
Kuv Ua Kuv Tus Kheej Lub Tshuab Npaum Li Cas?: 11 Kauj Ruam (nrog Duab)
Kuv Ua Kuv Tus Kheej Lub Boxing Li Cas?: Tsis muaj ib zaj dab neeg zoo nyob tom qab qhov haujlwm no - Kuv tsuas yog ib txwm nyiam lub tshuab ntaus nrig, uas tau nyob hauv ntau qhov chaw nrov. Kuv txiav txim siab tsim kuv tus kheej
Cov Cog Ntoo Cog Ntoo - Lub Vaj Me: 13 Kauj Ruam (nrog Duab)
Lub Caij Nplooj Ntoos Zeeg - Lub Vaj Me: Kuv yog tub ntxhais kawm los ntawm Multimedia thiab Kev Sib Txuas Lus Technology ntawm Howest Kortrijk. Txog peb txoj haujlwm kawg, peb yuav tsum txhim kho qhov haujlwm IoT ntawm peb tus kheej xaiv. Saib ib puag ncig rau lub tswv yim, Kuv txiav txim siab ua qee yam muaj txiaj ntsig rau kuv niam uas nyiam kev loj hlob
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
Kuv Rack-mounted Kuv Kab 6 Pod Guitar Effects Processor: 10 Kauj Ruam (nrog Duab)
Kuv Rack -mounted Kuv Kab 6 Pod Guitar Effects Processor: Kuv yuav ib qho ntawm kab thawj 6 POD chav nyob thaum lawv thawj zaug rov qab los rau xyoo 1998. Nws suab zoo li rov tshwm sim thaum ntawd thiab tseem suab zoo hnub no - qhov teeb meem tsuas yog nws cov duab - Txhawm rau muab nws meej, nws zoo li ua dag. Tseem ceeb dua, tshwj tsis yog tias koj muaj
Kuv Keyboard Kuv Tes: 8 Kauj Ruam (nrog Duab)
Kuv Cov Keyboard Kuv Tes: Kuv siv lub cim tshiab Epilog laser txiav uas qhia tsis ntev los no tau txais laser cim cov duab ntawm kuv txhais tes mus rau kuv lub laptop keyboard … mus tas li. Tam sim no uas yog voiding koj lav hauv DIY style