Cov txheej txheem:
- Kauj Ruam 1: Cov Khoom Siv thiab Cov Khoom
- Kauj Ruam 2: Muab Hardware Ua Ke
- Kauj ruam 3: Database Model (mySQL)
- Kauj Ruam 4: Kev Txuas Nrog Raspberry Pi
- Kauj Ruam 5: Software ntawm Raspberry Pi
- Kauj Ruam 6: Teeb tsa Lub Vev Xaib ntawm Raspberry Pi
- Kauj Ruam 7: Software: Python
- Kauj Ruam 8: Software: Lub Vev Xaib
- Kauj Ruam 9: Tsim Rooj Plaub
- Kauj Ruam 10: Tus Neeg Siv Manuel
Video: Ntse Tswb Tswb: Ntse Tswb Tswb Ua Nrog Raspberry Pi: 10 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Koj puas tau xav tau lub moos ntse? Yog tias yog, qhov no yog kev daws teeb meem rau koj!
Kuv tau ua Smart Alarm Clock, qhov no yog lub moos uas koj tuaj yeem hloov lub tswb ceeb toom raws li lub vev xaib. Thaum lub tswb nrov tawm, yuav muaj lub suab (buzzer) thiab 2 lub teeb yuav teeb (2 LEDs). Cov LEDs yuav tsuas pom thaum tsaus ntuj (lub teeb pom kev zoo). Cov LEDs ua kom ntseeg tau tias chav nyob tau ci ntsa iab kom koj tuaj yeem sawv ntsug ib txwm. Txhawm rau ua kom lub tswb nrov, nyem lub pob. Thaum koj xav siv qhov kev ua haujlwm snooze (+5min), koj yuav tsum tuav koj txhais tes ua ntej ntawm lub ntsuas ultrasonic. Yog tias pom cov lus tsa suab (ultrasonic sensor), cov xwm txheej ntawm LCD yuav hloov.
Cov xwm txheej ntawm LCD:
- IP-chaw nyob ntawm lub vev xaib
- Moos / hnub tim
- Lub sijhawm ceeb toom tom ntej
- Kub thiab av noo
Nov yog kuv thawj qhov haujlwm hauv kuv qhov kev kawm: Multimedia thiab kev sib txuas lus thev naus laus zis (MCT) ntawm Howest (Kortrijk belgium).
Kauj Ruam 1: Cov Khoom Siv thiab Cov Khoom
Txog kuv qhov haujlwm kuv siv ntau qhov uas kuv yuav teev hauv qab no, Kuv tseem yuav ntxiv cov ntawv ua tau zoo nrog txhua tus nqi sib xws ntawm cov khoom ib yam li cov vev xaib uas kuv tau xaj lawv.
Cheebtsam
- Raspberry Pi 3 qauv B+
- Raspberry Pi fais fab mov
- Lcd zaub
- Buzzer
- LDR
- 2 Ledas
- TSH-11
- HC-SR04 Ultrasonic nrug deb sensor
- Khawm
- Trimmer
Cov ntaub ntawv:
- Ntoo 7 hli
- Ntoo 2cm
- Cling zaj duab xis
Cov Cuab Yeej:
- Soldering
- Super kua nplaum
- Pom
- Ntsia Hlau
- Laum
Hauv daim ntawv PDF hauv qab no koj tuaj yeem pom daim ntawv teev nqi tiav.
Kauj Ruam 2: Muab Hardware Ua Ke
Kuv tau tsim kuv qhov Circuit los ntawm kev ua raws kuv cov phiaj xwm Fritzing uas kuv tau ua, kuv tau tshaj tawm cov phiaj xwm hauv qab no. Lub Circuit Court muaj ntau lub ntsuas cua thiab tus actuator uas ua haujlwm ua ke ua ib qho. Kuv yuav teev cov kab hluav taws xob sib txawv twg, koj yuav xav tau txuas li cas koj tuaj yeem pom hauv cov phiaj xwm.
- Muaj lub ntsuas hluav taws xob nrug deb deb uas pom qhov txav ntawm qhov deb ntawm 15 cm (tus lej cim tus kheej nrug) thiab nws hloov qhov xwm txheej ntawm lcd tab sis yog tias lub tswb tau qhib, nws tswb lub tswb rau 5 min.
- Muaj lub vijtsam LCD uas qhia txog 4 yam xwm txheej (ip-address, date/time, tswb tom ntej, temp/hum)
- A dht11 uas ntsuas qhov kub thiab txias ntawm huab cua
- Ib lub pob kom kaw lub tswb lossis yog koj nias ntev dua 3 vib nas this rpi yuav kaw
- Lub suab nrov los ua suab nrov yog tias lub tswb teeb tsa tau ua tiav lub sijhawm tam sim no
- LDR sensor los ntsuas lub teeb hauv chav
- 2 Coj kom ci ntsa iab hauv chav yog tias nws tsaus ntuj -> LDR
Kauj ruam 3: Database Model (mySQL)
Koj tuaj yeem pom kuv daim duab ERD saum toj no, Kuv tseem yuav txuas cov ntaub ntawv pov tseg kom koj tuaj yeem nqa cov ntaub ntawv khaws cia rau koj tus kheej.
Nrog rau cov ntaub ntawv no koj yuav tuaj yeem qhia ntau yam xws li:
- Qhov kub
- Vaum
- Teeb tus nqi
- Teeb tsa/xiam oob qhab/ncua sijhawm tswb
- Yog tias buzzer ua haujlwm
- Yog hais tias lub teeb nyob rau
Yog tias koj xav rov tsim cov ntaub ntawv no koj yuav tsum tau ua tus siv tshiab yog li koj tuaj yeem txuas rau koj li Raspberry Pi.
Kauj Ruam 4: Kev Txuas Nrog Raspberry Pi
Ua ntej tshaj plaws koj yuav tsum rub tawm Putty, muaj qhov pub dawb muaj nyob hauv lawv lub vev xaib. Koj tseem yuav xav tau Raspbian uas koj tuaj yeem rub tawm ntawm no.
Thaum koj qhib Putty koj yuav tsum nyem rau 'ntu'. Thaum koj tau ua tiav uas koj yuav tsum tau sau tus IP chaw nyob ntawm Pi hauv qab 'Tus Tswv Chaw Nyob'. Tom qab ntawd koj tuaj yeem sau lub npe siv uas koj tuaj yeem xaiv. ces nyem rau 'OK'.
Feem ntau tom qab txhua cov kauj ruam no nws yuav cia li pib qhov kev sib txuas. Tom qab ntawd koj yuav tsum nkag mus rau koj tus password, thiab koj tau txuas nrog.
Kauj Ruam 5: Software ntawm Raspberry Pi
Rau kuv tus lej ua haujlwm (uas kuv yuav txuas hauv qab no) koj yuav tsum tau teeb tsa qee pob khoom thiab tsev qiv ntawv. Thawj qhov uas xav tau yog rau koj hloov kho koj li Pi.
Ua ntej, hloov kho koj li kab ke cov npe khoom los ntawm kev nkag mus rau cov lus txib hauv qab no: sudo apt-tau hloov tshiab Tom ntej, hloov kho tag nrho koj cov pob khoom teeb tsa rau lawv cov kho tshiab kawg nrog cov lus txib hauv qab no: sudo apt-get dist-upgrade Tom qab koj tau teeb tsa pob khoom koj yuav yuav tsum tau teeb tsa qee lub tsev qiv ntawv:
- Flaskflask_cors
- RPI. GPIO
- hnub tim
- xov
- sij hawm
- cov txheej txheem
- ib mysq
- lSocketIO
Kauj Ruam 6: Teeb tsa Lub Vev Xaib ntawm Raspberry Pi
Mus rau koj lub Putty console.
peb yuav nruab Apache webserver. Los ntawm kev ua li ntawd koj yuav tuaj yeem qhib lub vev xaib ntawm txhua lub cuab yeej txuas nrog koj lub network. Ntaus cov lus txib hauv qab no thiab nias sau: sudo apt-tau nruab apache2
Tam sim no mus rau daim nplaub tshev:/var/www/html/Ntawm no koj tuaj yeem tso tag nrho koj cov ntaub ntawv los ntawm koj lub vev xaib thiab qhov index.html nplooj ntawv yuav qhib thaum twg koj xauj mus rau IP ntawm koj Pi. ceev faj tsis txhob ntaus lub peev I hauv index.html txwv tsis pub nws yuav tsis qhib qhov nplooj ntawv.
Kauj Ruam 7: Software: Python
Kuv tau ua ntau yam ntawv nab nab, Kuv yuav txuas kuv tus githubhere yog li koj tuaj yeem saib cov cai rau koj tus kheej. Tab sis kuv yuav piav qhia nws me ntsis lawm.
Kuv coded qee chav kawm rau Ultrasonic sensor, teeb, LDR thiab LCD. Kuv siv cov tsev qiv ntawv rau DHT11-sensor. (ntshuam Adafruit_DHT) Thaum kawg kuv tsuas siv ib daim ntawv los ua kom tiav txoj haujlwm, qhov no yog npe app.py. Tsis tas li hauv cov ntawv no kuv cim qee txoj hauv kev yog li kuv tuaj yeem nyeem cov ntaub ntawv los ntawm kuv cov ntaub ntawv thiab xa mus rau qhov khoom json uas kuv tau siv hauv kuv cov ntaub ntawv javascript.
Kauj Ruam 8: Software: Lub Vev Xaib
Vim tias kuv tau tsim txoj hauv kev uas koj tuaj yeem teeb tsa lub tswb ntawm lub vev xaib. Yog li kuv tau tsim lub vev xaib kom cia kuv ua qhov no. Los ntawm lub vev xaib koj tseem tuaj yeem saib cov av noo, kub thiab keeb kwm.
Thaum tus Pi tab tom pib, nws yuav pib khiav kuv cov ntawv nab nab. Qhov no yuav tau saib xyuas kom tau txais cov ntaub ntawv los qhia hauv lub vev xaib thiab ua rau nws muaj peev xwm teeb tsa lub tswb. Lub xaib tseem ua haujlwm zoo yog li nws tuaj yeem qhib rau ntawm lub xov tooj yam tsis tau poob cov yam ntxwv lossis lwm yam.
Kuv tus lej tuaj yeem pom ntawm github ntawm no.
Kauj Ruam 9: Tsim Rooj Plaub
Rau kuv rooj plaub, kuv tsim lub npov kom ua raws lub moos.
Kuv kuj tso duab uas koj tuaj yeem pom cov txheej txheem ntawm kev tsim rooj plaub. Txog qhov ntsuas kuv tseem yuav xa cov ntaub ntawv hauv qab no uas koj tuaj yeem pom kuv cov phiaj xwm ntawm koj yuav rov tsim nws li cas.
Kauj Ruam 10: Tus Neeg Siv Manuel
Ntawm no koj tuaj yeem pom phau ntawv qhia ceev ntawm txoj haujlwm ua haujlwm li cas. Vam tias koj hnub yuav zoo dua yog tias koj ua qhov no lub tswb ntse ntawm qhov kawg ntawm qhov kev qhia no!
Ua tsaug rau koj nyeem.
Pom zoo:
Tswb Tswb Tswb Tswb Tswb: 3 Kauj Ruam
Lub Tswb Tswb Tswb Tswb: Kuv yog menyuam kawm ntawv 13 xyoos hauv Taiwan.Kuv ua yam nrog Arduino thawj zaug yog tias koj tuaj yeem qhia kuv yuav ua li cas txhim kho txoj haujlwm no, thov tawm lus rau kuv kom kuv tuaj yeem ua qhov zoo dua. (Ua tsaug ) Lub moos no tuaj yeem tsa koj thaum koj tsaug zog, tab sis kuv
Tswb Tswb Tswb Tswb Tswb Ntse Teeb: 8 Kauj Ruam (nrog Duab)
Tswb Tswb Tswb Tswb Tswb Lub Teeb: Hauv qhov haujlwm no kuv tau siv lub tshuab cua-tsoo lub tswb tawg tag. Lub ntsej muag ntawm lub moos tau hloov pauv los ntawm 12 LEDs, teeb pom kev los ntawm LED kab ib ncig ntawm ntug ntawm lub moos. 12 LEDs qhia lub sijhawm thiab cov hlua LED tau teeb tsa los ua lub tswb, tig
Arduino Push Alerts rau Lub Tswb, Tswb Tswb, Tswb Tswb Tswb Thiab Lwm Yam: 8 Kauj Ruam
Arduino Push Alerts rau Tswb, Tswb Tswb, Tswb Tswb Tswb thiab lwm yam: IoT Cov Ntawv Ceeb Toom los ntawm koj lub Tswb, Tswb Tswb, Tswb Tswb thiab lwm yam siv Arduino Uno thiab Ethernet Shield. Cov ncauj lus kom ntxaws ntawm kuv lub vev xaib ntawm no Hais txog Arduino Push Alert Box Siv Arduino Uno thiab Ethernet Shield raws li Wiznet W5100 nti rau
Tswb Tswb Tswb Tswb Nrog Arduino: 9 Kauj Ruam (nrog Duab)
Tswb Tswb Tswb Tswb Nrog Arduino: Lub caij ntuj no tuaj yeem tu siab. Koj sawv, nws tsaus ntuj thiab koj yuav tsum tau tawm ntawm txaj. Qhov kawg uas koj xav hnov yog lub suab nrov nrov ntawm koj lub tswb tswb. Kuv nyob hauv London thiab kuv muaj lub sijhawm nyuaj thaum sawv ntxov. Tsis tas li ntawd, kuv nco tsis tau txog rau
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa: 7 Kauj Ruam (nrog Duab)
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa Tswm Tswm: Tsa Kuv Lub Caij Ntuj No Lub caij ntuj no kuv tus hluas nkauj muaj teeb meem sawv thaum sawv ntxov thiab zoo li raug kev txom nyem los ntawm SAD (Lub Caij Caij Nyoog Muaj Teeb Meem). Kuv txawm pom tias nyuaj npaum li cas kom sawv thaum lub caij ntuj no vim lub hnub tsis tuaj