Cov txheej txheem:
- Kauj Ruam 1: Cov Cheeb Tsam Koj Xav Tau
- Kauj Ruam 2: Teeb Raspberry Pi
- Kauj Ruam 3: Txuas rau Koj Tus Raspberry Pi
- Kauj Ruam 4: Ntsuas Qhov Ntev rau Kev Tsim Ntoo
- Kauj Ruam 5: Siv Lub Vev Xaib Sib nrug
- Kauj Ruam 6: Ua Sab Pem Hauv Ntej ntawm Daim iav
- Kauj Ruam 7: Ua Tom Qab Ntawm Daim iav
- Kauj Ruam 8: Ua tiav Kev Tsim Ntoo
- Kauj Ruam 9: Tso lub Plexi-iav thiab Screen hauv Kev Tsim Kho
- Kauj Ruam 10: Tso Nws Txhua Qhov Ua Ke
- Kauj ruam 11: SQL- Database
- Kauj ruam 12: SQL Kev Sib Txuas rau Pycharm
- Kauj Ruam 13: Tau Txais Txoj Cai rau Txoj Haujlwm
- Kauj Ruam 14: Pib Ua Haujlwm Txoj Haujlwm
- Kauj Ruam 15: Txaus Siab Rau Koj Daim iav Ntse
Video: Kuv Daim iav Ntse: 15 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Lub sijhawm thaum sawv ntxov tuaj yeem txwv. Koj yuav tsum tau npaj rau kev ua haujlwm, tsev kawm ntawv,… Saib huab cua yuav siv qee lub sijhawm uas nyob ntawd. Daim iav ntse tshem tawm lub sijhawm koj xav tau qhib koj lub xov tooj lossis khoos phis tawj thiab saib huab cua. Hauv txoj haujlwm no peb yuav ua daim iav zoo li no. Nws yuav tuaj yeem qhia koj lub sijhawm, huab cua hauv cheeb tsam, qhov kub thiab av noo ntawm qhov chaw uas koj daim iav dai. Cov ntaub ntawv no tseem yuav raug qhia ntawm lub vev xaib ua hauv tsev.
Kauj Ruam 1: Cov Cheeb Tsam Koj Xav Tau
Cov npe ntawm cov khoom tuaj yeem pom hauv pdf hauv qab no
- Khoos phis tawj lub computer nrog HDMI cov tswv yim (lossis DVI cov tswv yim nrog hloov pauv zoo li hauv kuv qhov teeb meem)
- DHT11 kub thiab av noo sensor
- Raspberry pi 3 qauv B.
- Ntoo
- Kho vajtse txhawm rau kho cov ntoo hauv qhov chaw (ntsia hlau, kua nplaum, nkhaus)
- Cov iav tsom iav, sim txiav txim qhov ntev raws li ze ntawm qhov ntev ntawm lub vijtsam. Kuv xaj kom muaj kev cai me me thiab ntsuas sab nrauv ntawm lub vijtsam, sib sau ua ke, nrog ciam teb. Lub vijtsam tuaj yeem so ntawm daim iav nkag mus.
- Cables txuas lub sensor rau koj tus txiv pos raspberry (poj niam-poj niam 2.54 txog 2.0mm jumper xov hlau tau thov)
- HDMI kab
Kauj Ruam 2: Teeb Raspberry Pi
Tam sim no nws yog lub sijhawm los teeb tsa qee software kom tswj tau Raspberry Pi:
- Raspbian OS duab
- Win32 disc tus tswj hwm
1) Nruab Raspbian OS software los ntawm Raspberry pi lub vev xaib.
Rub tawm ZIP cov ntaub ntawv thiab rho tawm nws mus rau qhov chaw xav tau.
2) Rub tus Win32 disc tus tswj.
- Nyem rau ntawm daim nplaub tshev icon xaiv cov duab
- Tom qab ntawv xaiv ntawm "Ntaus" koj microSD
- Tom qab ntawv nyem rau "Sau"
Thaum cov duab sau rau ntawm koj daim npav MicroSD, koj tuaj yeem qhib nws hauv Windows Explorer.
- Qhib cov ntaub ntawv "cmdline.txt"
- Ntxiv kab hauv qab no ua ntej lo lus "rootwait": 169.254.10.0
- Tom qab ntawd khaws cov ntawv.
Tam sim no ntxig MicroSD rau hauv koj li Raspberry pi
Thov lub hwj chim rau koj Pi nrog 5, 2V lub zog hloov pauv.
Txuas lub network cable rau koj Pi thiab koj lub computer.
Kauj Ruam 3: Txuas rau Koj Tus Raspberry Pi
Tam sim no peb tau teeb tsa txhua yam koj xav tau los siv koj li RPi
1) Nruab Putty thiab qhib nws.
2) Tsim kev sib txuas (raws li qhia hauv daim duab)
3) Nkag mus rau koj tus pi:
- username: pib
- Lo lus zais: raspberry
4) WIFI teeb tsa
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Hauv qab ntawm cov ntawv, koj ntxiv cov kab no:
network = {ssid = "lub npe ntawm lub wireless network" psk = "password ntawm lub wireless network"
}
5) Txhawm rau txuas wireless rau koj RPi koj yuav tsum xub nrhiav koj tus IP chaw nyob ntawm tus lej no:
ifconfig wb 0
Tam sim no koj tuaj yeem siv tus IP chaw nyob hauv putty nkag mus rau wireless.
Kauj Ruam 4: Ntsuas Qhov Ntev rau Kev Tsim Ntoo
Koj yuav tsum ntsuas 2 yam:
- Qhov ntev ntawm koj lub vijtsam (! Tsuas yog tshuaj ntsuam, tsis muaj ntug!)
- Qhov ntev ntawm daim iav plexi koj tau yuav
Nco ntsoov tias cov ntsuas no yuav yog sab hauv ntawm lub duab plaub. Thaum yuav ntoo, koj yuav tsum tau ntxiv 8 npaug tus nqi ntawm qhov dav ntawm ntoo kom muaj qhov ntev raug vim tias nws zoo yog tias koj pom ntoo hauv miter.
Rau pem hauv ntej ntawm daim iav, kuv tau siv ntoo ntoo ntawm 18 txog 69mm thiab ntev txog 210cm
Sau qhov ntev cia, peb yuav siv lawv tom qab.
Kauj Ruam 5: Siv Lub Vev Xaib Sib nrug
Tam sim no peb yuav coj qhov screen sib nrug. Txhua lub vijtsam sib txawv, rau kuv lub vijtsam kuv yuav tsum xoob 4 tus ntsia hlau thiab tshem tawm cov ntsia ib ncig ntawm lub saib. Kuv qhov teeb meem, lub vijtsam tau txuas nrog lub zog siv los ntawm tsuas yog ob peb txoj xov hlau. Yog li kuv tau kaw lub nraub qaum rau ntawm qhov screen nws tus kheej, yog li nws yuav tsis txav mus los.
Kauj Ruam 6: Ua Sab Pem Hauv Ntej ntawm Daim iav
- Txhawm rau ua ntu ntu, peb xav tau qhov ntsuas ntawm lub vijtsam yam tsis muaj ciam teb. Koj tuaj yeem xaiv qhov dav ntawm ntoo yuav tsum yog, tab sis kuv pom zoo kom siab txog +/- 20mm. Ciam teb tsis tas yuav siab li ntawd.
- Nws pab tau yog tias koj ua thawj daim duab zoo li hauv daim duab thib ob nrog koj ntsuas. Nws pab thaum txiav cov ntoo.
- Ntsuas qhov ntev ntawm koj lub vijtsam ntawm ntoo. Kos kaum kaum ntawm 45 ° sab nraud ntawm txhua sab. Rov ua qhov no rau 4 qhov ntev ntawm koj lub vijtsam.
- Koj tuaj yeem txiav cov phiaj ntoo koj tus kheej siv lub viav vias ncig, lossis nug lub khw uas koj yuav cov phiaj ntoo ua nws rau koj.
- Kuv tau hlais 2 lub qhov me me rau ib lub plank ntawm ib sab hauv qhov siab ntawm ntoo, yog li kuv tuaj yeem haum cov kais dej hauv lub qhov kom txuas cov ntoo ua ke.
- Txhawm rau txhim kho lawv ua ke tas li kuv siv cov kua nplaum ntoo.
- Cia cov kua nplaum ua kom tawv thaum hmo ntuj.
Kauj Ruam 7: Ua Tom Qab Ntawm Daim iav
- Tam sim no peb yuav xav tau qhov ntsuas ntawm daim iav-plexi.
- Peb yuav tsis txiav cov ntoo ntawm lub kaum sab xis 45 °.
- Koj daim duab yuav tsum zoo li daim duab thib peb.
- Txog qhov ntev, peb tab tom yuav ntxiv 2 npaug ntawm qhov dav ntawm cov ntoo.
- Txog qhov siab, peb tab tom txiav cov phiaj rau qhov ntsuas ntawm plexi-daim iav. Qhov tshwm sim yog, thaum tso cov phiajcim zoo li hauv daim duab, kev ntsuas sab hauv zoo ib yam rau ntawm plexi-daim iav.
- Txhawm rau txhim kho cov ntoo ntoo ua ke, kuv drilled qhov thiab txuas nws nrog cov ntsia hlau. Vim tias qhov no yuav yog sab nraub qaum, kev kho kom zoo tsis yog qhov tseem ceeb.
Kauj Ruam 8: Ua tiav Kev Tsim Ntoo
Tam sim no, peb tab tom yaum 2 lub tsev tsim ua ke.
Kuv siv hlau 90 ° khoov thiab ntsia hlau txhawm rau kho 2 raws li qhia hauv daim duab.
Koj tseem tuaj yeem siv cov duab plaub me me nrog cov ntsia hlau, tab sis nws tsis tsim nyog.
Kauj Ruam 9: Tso lub Plexi-iav thiab Screen hauv Kev Tsim Kho
- Yog tias txhua yam yog qhov raug, koj daim iav haum zoo nyob tom qab thiab so ntawm ntug ntawm sab xub ntiag.
- Kuv muab qee cov kua nplaum tso rau ntawm ntug thiab muab daim iav tso rau hauv nws txoj haujlwm zaum kawg.
- Muab qee qhov hnyav tso rau ntawm daim iav, yog li nws qhuav zoo.
- Cia nws zaum ib hmo.
Kauj Ruam 10: Tso Nws Txhua Qhov Ua Ke
Tam sim no peb kev tsim kho tiav, peb yuav tso peb lub vijtsam hauv lub tsev, nrog DHT11 ntsuas kub.
Koj yuav kho nws li cas, yog nyob ntawm koj, tsuas yog xyuas kom lub vijtsam thiab pi tsis mus qhov twg.
Kuv tau teeb tsa DHT11 lub ntsuas kub sab nraud ntawm daim iav, yog li kev nyeem yuav yog qhov tseeb tshaj plaws.
Kauj ruam 11: SQL- Database
- Hauv cov kauj ruam no peb yuav txhim kho qee yam khoom uas yuav ua rau nws muaj peev xwm khiav cov ntaub ntawv khaws cia.
- sudo apt hloov tshiab
- sudo apt install -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3
Tam sim no peb tsis muaj neeg siv. Peb siv cov cai no los tsim cov neeg siv, koj tsuas yog yuav tsum tau sau rau tus neeg siv thiab tus password:
Tsim tus neeg siv 'FILL_USER_IN'@'localhost' IDENTIFIED BY 'FILL_PASSWORD_IN';
Tsim DATABASE ntse-daim iav;
ZOO TSHAJ PLAWS NTUJ NTAWV ntawm ntse-daim iav.* Rau 'FILL_USER_IN'@'localhost' NROG QHOV ZOO TSHAJ PLAWS;
sudo mariadb <sql/db_init.sql
Kauj ruam 12: SQL Kev Sib Txuas rau Pycharm
Peb yuav txuas peb cov ntaub ntawv khaws cia rau pycharm
- Mus rau View> Tool Windows> Database thiab nyem rau ntawm ntsuab ntxiv rau ntxiv kev sib txuas
- Xaiv Cov Ntaub Ntawv Qhov Chaw> MySQL thiab Rub tus tsav tsheb, yog tias nws los txog
General
- Tus tswv = localhost
- Chaw nres nkoj = 3306
- Tus neeg siv = *lub npe koj xaiv hauv qib kawg *
- Lo lus zais = * tus lej koj tau xaiv hauv qib kawg *
SSH/SSL
- Proxy host = * koj tus IP chaw nyob *
- Chaw nres nkoj = 22
- Proxy user = pib
- Pov thaiv tus password = raspberry
Kom ntxig ntxhuav
- koj txoj nyem rau ntawm ntse-daim iav> qhib console
- Ua sql hauv zip file hauv console
- Database yog ua
Kauj Ruam 13: Tau Txais Txoj Cai rau Txoj Haujlwm
Hauv pycharm mus rau:
Cov ntaub ntawv> chaw> Tsim, Ua tiav, Kev xa tawm> Kev xa tawm
Sau qhov screen zoo li hauv daim duab
Ua tib yam hauv
File> Default settings> Build, Execution, Deployment> Deployment
Tam sim no koj tsuas yog rub cov lej los ntawm kuv github thiab qhib nws hauv pycharm
Kauj Ruam 14: Pib Ua Haujlwm Txoj Haujlwm
Txhawm rau thauj cov vijtsam nplooj ntawv thaum pib, hauv koj Pi, koj ntaus qhov no:
cd /home/pi/.config/lxsession/LXDE-pi/
thiab qhib cov ntawv autostart nrog nano
nano autostart pib
Koj paub tseeb tias qhov no yog dab tsi hauv cov ntawv:
@lxpanel --profile LXDE-pi @pcmanfm-desktop --profile LXDE-pi @xscreensaver -no-splash @point-rpi @chromium-browser --incognito --kiosk 127.0.0.1/monitor @xset s noblank @xset s tawm @xset -dpms
Tam sim no nplooj ntawv saib yuav thauj khoom thaum pib thiab lub vijtsam tsis ua haujlwm.
Kauj Ruam 15: Txaus Siab Rau Koj Daim iav Ntse
Tam sim no koj tsuas yog lub zog ntawm lub vijtsam thiab pi, thiab cia daim iav ua nws cov khawv koob.
Nws yuav siv qee lub sijhawm rau Daim iav kom khau raj, tab sis cia nws ua nws txoj haujlwm.
Qhov chaw ntawm lub vijtsam tau teeb tsa rau Kortrijk, Belgium, qhov chaw uas tsom iav tau ua, tab sis yog tias koj xav hloov nws, mus rau hauv lub vev xaib> zoo li qub> JavaScript nplaub tshev hauv cov cai thiab tshawb nrhiav kab uas Lub Nroog = Kortrijk; (nws yog thawj kab ntawm txoj cai). Koj tuaj yeem hloov nws mus rau qhov chaw koj nyob. Koj yuav tsum hloov nws hauv 2 javascript cov ntaub ntawv rau qhov chaw hloov pauv ntawm qhov chaw thiab ntawm daim iav.
Txaus siab rau koj daim iav ntse!
Qhov khoom plig thib ob hauv Kev Sib Tw Clocks
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
Yuav Ua Li Cas DIY Ntse Daim iav: 12 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas DIY Ntse Daim iav: A " Daim iav Ntse " yog daim iav ob txoj hauv kev nrog cov duab tom qab nws uas feem ntau siv los tso tawm cov ntaub ntawv muaj txiaj ntsig zoo li lub sijhawm thiab hnub tim, huab cua, koj daim ntawv qhia hnub, thiab txhua yam ntawm lwm yam! Tib neeg siv lawv rau txhua lub hom phiaj
Kuv Thawj Daim iav Ntse: 8 Kauj Ruam
Kuv Thawj Daim iav Ntse: Peb txhua tus paub qhov teeb meem no, peb sawv ntxov lig dhau lawm, yog li peb yuav tsum tau npaj sai heev. Qhov ntawd txhais tau tias koj tsis muaj sijhawm los saib seb huab cua zoo li cas. Tab sis dab tsi koj yeej muaj sijhawm rau saib hauv daim iav. Yuav ua li cas yog tias peb yuav
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