Cov txheej txheem:
- Kauj Ruam 1: Cov Cheeb Tsam Koj Xav Tau
- Kauj Ruam 2: Teeb Raspberry Pi
- Kauj Ruam 3: Txuas Koj Tus Pi rau Koj WIFI
- Kauj ruam 4: Kho vajtse
- Kauj ruam 5: SQL- Database
- Kauj Ruam 6: Code rau Daim iav
- Kauj Ruam 7: Lub Vev Xaib
- Kauj ruam 8: Pib Pib App.py
- Kauj Ruam 9: Ua Case
- Kauj ruam 10: Kuv vam tias koj nyiam nws
Video: Daim iav Ntse: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Peb txhua tus paub lub sijhawm koj nyob hauv chav da dej thiab poob teev. Los yog koj tsis paub tias huab cua yuav zoo li cas hnub no … lwm yam iav tsom iav tuaj yeem pab tau. Rau kuv qhov haujlwm kuv tau ua qhov me me ntawm daim iav ntse kom txuag qee qhov chaw hauv chav dej. Koj tuaj yeem pom huab cua, teev, hnub, qhov chaw, qhov kub thiab txias nyob ntawm nws. Kuj tseem muaj lub vev xaib txuas rau nws qhov uas koj tuaj yeem pom tag nrho cov ntaub ntawv hauv kab duab thiab hloov xim ntawm LED sawb.
Kauj Ruam 1: Cov Cheeb Tsam Koj Xav Tau
Nov yog cov npe ntawm cov khoom koj xav tau.
- Raspberry Pi zaub 5inch
- Raspberry Pi 3 b+
- 8GB micro sd
- Raspberry Pi muab 5.1V/2.5A
- Digitale RGB Ledstrip WS2801
- DHT11 kub thiab av noo sensor
- Ntoo
- Kho vajtse los kho cov ntoo (kua nplaum & pom)
- HDMI kab
- PIR (tsab ntawv tsa suab sensor)
- DS18B20 (ntsuas kub)
Kauj Ruam 2: Teeb Raspberry Pi
Cia peb pib los ntawm kev txhim kho qee cov software.
- WinSCP
- Win32 disc tus tswj hwm
- MobaXterm
- VNC saib
- MySQL Workbench
Ua ntej koj nruab Win 32. Thaum koj tau teeb tsa Win 32 koj tuaj yeem pib txhim kho cov duab ntawm pi.
Thaum koj qhib yeej 32 koj yuav pom tias daim nplaub tshev tuaj yeem xaiv. Xaiv koj daim npav micro sd (sab saum toj sab xis) thiab nyem rau sau (hauv qab). Kev teeb tsa yuav siv sijhawm me ntsis. Lub caij no koj tuaj yeem nruab tag nrho lwm cov software.
Thaum koj daim duab raug teeb tsa, koj tuaj yeem tso koj daim npav SD rau hauv koj tus pi thiab txhawb koj lub zog. Txuas koj tus pi nrog lub xov tooj cua ethernet rau koj lub khoos phis tawj/laptop tom qab qhov no koj pib mobaXterm. Mus rau ntu => SSH => thiab sau cov ntaub ntawv hauv qab no (saib duab kom ntxaws). Nrog rau qhov no koj nkag mus rau koj tus pi ntawm kev sib txuas ssh ntawm chaw nres nkoj 22 nrog lub npe siv "dp-siv r" thiab tus password "dp-user".
Kauj Ruam 3: Txuas Koj Tus Pi rau Koj WIFI
Yog tias koj txuas nrog koj pi koj tuaj yeem teeb tsa koj li wifi nrog cov kauj ruam hauv qab no.
sudo raspi-teeb tsa
- Mus rau cov kev xaiv network
- Nkag mus rau wi-fi
- Sau koj lub npe network
- Sau koj tus password
Tam sim no koj tau nkag mus rau koj li wifi thiab tuaj yeem hloov kho koj tus pi nrog cov cai hauv qab no.
sudo apt hloov tshiab
sudo apt hloov tshiab -y
Qhov no ua kom ntseeg tau tias koj tus pi tau hloov kho tshiab.
Kauj ruam 4: Kho vajtse
Tam sim no koj tus pi tau npaj txhij tag koj tuaj yeem pib teeb tsa Circuit. txuas raws li hais saum toj no schematics koj Circuit. Koj yuav pom tias mcp3008 tau siv. Koj tsis xav tau qhov no, qhov no yog qhov txuas rau lub vijtsam. Cov kab ntawv coj muaj lub moos, Mosi, GND thiab 5V.
Kauj ruam 5: SQL- Database
Lub sijhawm los tsim cov ntaub ntawv. Qhib koj lub mariaDB ib puag ncig ntawm koj tus pi nrog cov lej hauv qab no.
Ua ntej koj tsim tus neeg siv nrog:
CREATE USER 'mct'@'%' IDENTIFIED BY 'mct';
tom qab ntawd koj paub tseeb tias nws muaj txhua txoj cai:
ZOO TSHAJ PLAWS YOOJ YIM RAU *. * TO 'mct'@'%' Nrog GRAND OPTION;
Qhov kawg tab sis tsis tsawg kawg, koj yaug txhua yam:
NTSEEG NTAWV QHOV TSEEB;
Tam sim no rov pib qhov kev pabcuam:
sudo kev pabcuam mysql rov pib dua
Qhib mysql Workbench. Ua qhov txuas tshiab. Yog xav paub ntxiv saib daim duab.
Tam sim no qhib ntshuam, ntshuam cov ntaub ntawv thiab ua raws txoj cai.
Kauj Ruam 6: Code rau Daim iav
Qhib pyCharm thiab mus rau qhov chaw => Tsim, Exixution, Deployment => xa tawm. Nias qhov ntxiv thiab ntxiv SFTP (saib duab).
Tam sim no koj tsuas yog rub cov lej los ntawm kuv github thiab qhib nws hauv pycharm.
Kauj Ruam 7: Lub Vev Xaib
Txhawm rau muab lub vev xaib rau koj tus pi, ntxiv cov cai hauv qab no rau koj pi.
sudo apt-tau nruab intache apache2-y
Txhawm rau nkag mus ua tus neeg siv dp:
sudo chown dp-user: hauv paus *
Txhawm rau nkag mus rau daim nplaub tshev thiab ntxiv cov ntaub ntawv rau nws.
sudo chown dp-user: hauv paus/var/www/html
Qhib WinSCP. Tsim kev sib kho tshiab thiab sau cov ntawv raws li pom hauv daim duab.
Xaiv koj cov ntaub ntawv thiab rub lawv mus rau koj/var/www/html nplaub tshev.
Kauj ruam 8: Pib Pib App.py
Txhawm rau pib koj app.py cia li mus rau koj lub crontab thiab ntxiv cov lej no:
sudo crontab -e
Hauv qab ntawm cov ntawv, sau cov cai hauv qab no (piav qhia hauv daim duab).
@reboot python3 /var/www/html/app.py
Ctrl + x kom tawm thiab y nkag mus txuag.
Kauj Ruam 9: Ua Case
Lub tswv yim yog qhov yooj yim Kuv coj qhov loj me ntawm kuv lub vijtsam, qhov ntev ntawm kuv lub khob cij thiab qhov loj me ntawm kuv tus pi ua lub qhov nyob hauv qab kom tso PIR rau hauv.
Vim tias koj siv lub hdmi cable yuav tsum muaj lwm daim uas yuav tsum muaj rau koj.
Kauj ruam 10: Kuv vam tias koj nyiam nws
Kuv vam tias koj txaus siab rau daim iav ntse ntse.
Hmoov zoo!
Pom zoo:
Ua Ib Daim iav Daim Duab Infinity: 15 Kauj Ruam (nrog Duab)
Ua Lub Tsom iav Infinity: Hauv qhov haujlwm yav dhau los kuv tau tsim daim iav tsis muaj qhov kawg, qhov twg kuv lub hom phiaj kawg rau nws yog ua kom nws ua lub moos. (Ua Daim iav Infinity Muaj Xim) Kuv tsis tau ua raws li tom qab tsim nws vim tias, txawm hais tias nws zoo li txias, muaj qee yam nrog
C.Q: DIY Daim iav Ntse: 5 Kauj Ruam
C.Q: DIY Daim iav Ntsej Muag: Peb yog Katrina Concepcion thiab Adil Qaiser, ob tus kawm qib ob ntawm WBASD STEM Academy. Nov yog txoj haujlwm uas peb yuav tau koom tes thiab ua tiav rau lub xyoo zoo tshaj plaws khoom plig. Thaum peb txiav txim siab ua txoj haujlwm no, peb tau xav hauv siab " dab tsi yuav yog qhov zoo tshaj plaws
Tsiv daim phiaj nrog daim iav Infinity: 7 Kauj Ruam
Tsiv Grid Nrog Daim iav Infinity: cov yeeb yaj kiab no ua yeeb yaj kiab thiab txav video.Peb xav qhia qhov chaw nrawm nrawm los ntawm kev txav chaw thiab Daim iav Infinity los qhia qhov kev nkag siab ntawm qhov chaw zoo dua. Peb txoj haujlwm muaj ob daim phaj acrylic, sab xub ntiag, thiab cov duab nraub qaum, uas
Tsom iav tsom iav Siv Daim Kab Xev: 5 Kauj Ruam (nrog Duab)
Tsom iav tsom iav Siv Daim Kab Xev: Muaj qee yam uas ua rau muaj kev ntxhov siab ntau dua li siv hmo ntuj thaij duab saum ntuj nrog koj lub tsom iav raj, tsuas yog txhawm rau pom tias txhua yam ntawm koj cov duab tsuas yog tsom me ntsis … nyuaj
Infinity Daim iav Phab Ntsa Hauv IKEA Daim Duab Duab: 4 Kauj Ruam
Infinity Mirror Wall Clock hauv IKEA Daim Duab Duab: Nyob zoo, Kuv ib txwm xav tsim lub moos phab ntsa. Muaj ntau ntau ntawm cov phab ntsa zoo nkauj hauv khw xws li IKEA. Kuv muaj qee qhov teeb meem nrog cov lag luam moos no. Lawv nrov heev rau kuv (tic-tac txuas ntxiv yog qhov tsis txaus ntseeg), Kuv tsis tuaj yeem pom lub sijhawm teev