Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Teem Koj Li Google Account
- Kauj Ruam 2: Teeb Raspberry Pi
- Kauj Ruam 3: Tsim Lub Thawv
- Kauj Ruam 4: Txuas Lub Teeb Pom Kev rau RaspberryPi
- Kauj Ruam 5: Tua Sijhawm Lapses
Video: Lub Sijhawm Lapse Box: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Cov ntawv qhia no yuav qhia yuav ua li cas tsim Raspberry Pi teeb tsa los tua lub sijhawm!
Kev teeb tsa yog ua los ntawm ib lub thawv uas muaj lub teeb pom kev zoo thiab lub koob yees duab (PiCamera) tswj los ntawm Raspberry Pi kom thaij duab thiab muab tso rau hauv Google Drive.
Kuv thov kuv lub teeb-lub thawv kom ncua sijhawm kev loj hlob ntawm cov kab mob loj nyob rau saum Petri-tais. Txawm li cas los xij, qhov teeb tsa no tuaj yeem hloov kho kom yooj yim rau ncua sij hawm lossis pom qhov muag pom txhua yam koj xav tau!
Kuv yuav taug kev koj los ntawm txhua cov kauj ruam kuv ua raws kom tau txais kuv li haujlwm:
Kauj Ruam 1: Koj yuav npaj koj tus lej Google kom koj li Raspberry Pi tuaj yeem xa cov duab mus rau Google Drive
Kauj Ruam 2: Koj yuav teeb tsa koj lub Raspberry Pi los tswj lub teeb ci thiab lub koob yees duab thiab kom nws tuaj yeem nkag mus rau koj GoogleDrive
Kauj Ruam 3: Koj yuav tsim lub thawv thiab teeb tsa Picamera
Kauj Ruam 4: Koj yuav xaim Raspberry Pi GPIO thiab lub teeb pom kev los ntawm kev xa mus
Kauj ruam 5: Pib tua!
Nco ntsoov tias qhov kev txiav txim ntawm ntu ntawm qhov kev qhia no tsis muaj teeb meem. Koj tuaj yeem ua raws lawv hauv txhua qhov kev txiav txim koj xav tau!
Cia peb tau txais STAAAAAARTED
Khoom siv
1) 1 Raspberry Pi (Nov Version Pi 3 Model B +) + 1 Picamera (Nov Module V2) + 1SD daim npav (nruab nrab ntawm 8 thiab 32Gb)
2) 2 5V Cov khoom siv fais fab, keyboard, nas, tshuaj ntsuam thiab WIFI rau ua haujlwm nrog koj li Raspberry Pi
3) Ib qho 5V xa tawm thiab ib pawg ntawm cov xov hluav taws xob.
3) Lub teeb ci (Ntawm no kuv siv lub teeb ci Gaomon GB4 txhawm rau teeb lub Petri-tais los ntawm hauv qab no!)
4) Lub thawv loj (lossis cov laug cam ntoo los tsim nws)
7) Cov cuab yeej siv sib xws (plyers, tus neeg tsav tsheb ntsia hlau, kab xev, cov hlau txuas, xyaum) + 3 cov ntsia hlau ib nrab (2.2 txog 2.5mm txoj kab uas hla)
Kauj ruam 1: Teem Koj Li Google Account
Taw qhia rau cov kauj ruam no
Peb khaws cov duab coj los ntawm Raspberry Pi ntawm Google Drive. Nyob rau sab saum toj ntawm kev zam kev sau koj Pi lub cim xeeb, qhov no yuav tso cai rau koj los tshuaj xyuas koj lub sijhawm dhau los ntawm txhua qhov chaw thoob ntiaj teb!
Google tau tshaj tawm Python pob hu ua PyDrive uas tso cai rau koj rub thiab rub cov ntawv nrog … Python!
Google muab ntau cov ntaub ntawv kom nkag siab yuav ua li cas thiaj lis PyDrive. Kuv kuj pom Annis cov ntawv qhia tau pab tau heev. Txawm li cas los xij, yog tias koj yog tus kws tshawb fawb keeb kwm zoo ib yam li kuv, txhua qhov kev siv lub ntsiab lus no (API, thaj tsam, ntws, token …) yuav nyuaj me ntsis. Yog li ntawm no yog zaj dab neeg raws li kuv nkag siab nws:
Koj tsim ib qhov haujlwm ntawm koj tus lej Google thiab pab kom tus programmer xaiv rau txoj haujlwm no. Google yuav muab koj lub npe thiab tus lej cim lej uas koj tus ntawv nab nab siv los txuas rau koj tus lej Google. Thaum txuas thawj zaug, Python siv kev tso cai "ntws" qhov twg nws qhia Google qhov kev pabcuam nws xav tau nkag mus (Cov npe ntawm cov kev pabcuam Python xav tau nkag mus hu ua "scope"). Thaum Google tau txais kev thov ntws los ntawm nab nab, nws yuav nug koj kev tso cai. Thaum koj lees txais tus kheej, Python tau txais daim ntawv pov thawj thiab tus cim to txuas nrog Google yam tsis muaj kev tso cai ntawm koj yav tom ntej.
1) Mus rau Google Cloud Plateform thiab nyem rau ntawm Xaiv Qhov Project ntawm kab xiav. Nyem rau ntawm Txoj Haujlwm Tshiab nyob rau sab xis saum toj ntawm lub qhov rai pop-up. Npe koj qhov project thiab nyem Tsim. Qhov no yuav coj koj rov qab mus rau nplooj ntawv txais tos. Ib zaug ntxiv, nyem rau ntawm Xaiv Qhov Haujlwm ntawm kab xiav. Tam sim no nyem rau ntawm qhov haujlwm tshiab uas koj nyuam qhuav tsim.
2) Nyem rau ntawm Burger ntawv qhia zaub mov nyob rau sab saud sab laug ntawm koj lub vijtsam. Ntawm kab sab laug ntawm lub vijtsam xaiv API & Kev Pabcuam >> Dashboard. Tom qab ntawd, tsuas yog nyob hauv kab ntawv xiav xaiv + ENABLE APIS thiab KEV PAB. Tom ntej no, tshawb rau Drive hauv kab ntawv tshawb fawb thiab xaiv Google Drive. Tom qab ntawv nyem rau pob Enable.
3) Rov qab mus rau Burger menu >> API & Services thiab lub sijhawm no xaiv Cov Ntawv Pov Thawj. Ntawm nplooj ntawv tom ntej mus rau ntawm OAuth Pom Zoo Screen thiab muab koj daim ntawv thov npe thiab Txuag. Tam sim no nyem rau ntawm xiav 'Tsim Cov Ntawv Pov Thawj Muaj Peev Xwm' khawm xaiv OAuth Client ID xaiv. Tam sim no zuam lwm qhov kev xaiv thiab Tsim.
4) Tam sim no koj tuaj yeem rub tawm cov ntawv hu ua client_secret.json. Cov ntaub ntawv no khaws koj daim ntawv pov thawj thiab tus cim. Nws yuav siv los ntawm koj cov ntawv nab nab ntawm koj li Raspberry Pi los cuam tshuam nrog koj tus lej Google. Txog tam sim no txuag nws ntawm flashdrive li 'credentials.json', koj yuav xa nws mus rau koj li Raspberry Pi ib zaug teeb tsa.
Kauj Ruam 2: Teeb Raspberry Pi
Taw qhia rau cov kauj ruam no:
Ntawm no, koj yuav nruab pob thiab cov ntawv nab nab rau koj Raspberry Pi kom ua haujlwm. Python tsab ntawv lapser.py yog lub hlwb uas tswj hwm peb cov cuab yeej siv sijhawm-lapse. Nws muaj peb lub luag haujlwm tseem ceeb:
1) Nws cuam tshuam nrog Google Drive. Raws li tau piav qhia hauv ntu 1, yog tias koj xav paub ntau ntxiv txog ntu no saib ntawm no, ntawm no thiab ntawm no). 2) Nws ua raws GPIO kom tig lub teeb ci. 3) Nws ua haujlwm rau PiCamera los thaij duab.
Yog tias koj xav nkag siab tias tsab ntawv ua haujlwm li cas, Kuv tau tawm tswv yim hnyav txhua kauj ruam thiab suav nrog cov kev txuas mus rau kev qhia online uas kuv tau siv los sau nws.
Zoo peb pib:
1) Npaj koj daim npav SD
Format koj daim npav SD kom format FAT. Rub tawm NOOBS los ntawm Raspberry Pi lub vev xaib. Luam thiab muab tag nrho cov ntaub ntawv los ntawm koj cov ntawv rub tawm tshiab ncaj nraim rau koj daim npav SD. Yog tias nyam, cov lus qhia ntxaws tuaj yeem pom ntawm no.
2) Pib koj li Raspberry Pi
Tsuas yog ntxig koj daim npav SD hauv koj Pi tig, nws qhib, thiab ua raws li cov lus qhia pib.
3) Nco ntsoov tias koj Raspberry Pi tau teeb tsa lub sijhawm raug:
> hauv lub qhov rai hais kom ua sau cov lus txib hauv qab no:
sudo date -s "Mon Aug 30 15: 27: 30 UTC 2019"
4) Nco ntsoov tias koj siv nab hab sej 3
> hauv lub qhov rai hais kom ua sau cov lus txib hauv qab no:
sej -version
> yog tias cov nab hab sej version tsis yog 3 kho cov ntaub ntawv.bashrc los ntawm kev nkag mus rau cov lus txib hauv qab no:
sudo nano ~/.bashrc
Qhib qhov kawg ntawm daim ntawv thiab ntxiv kab hauv qab no mus rau qhov kawg ntawm cov ntaub ntawv:
npe nab nab = 'usr/bin/python3.5'
txuag thiab reboot
5) Txhim kho cov pob khoom xav tau:
> hauv lub qhov rai hais kom ua sau cov lus txib hauv qab no:
pip nruab pydrive
sudo apt-tau nruab libatlas-base-dev
pip nruab google-auth-oauthlib
nab hab sej -m pip nruab -U matplotlib
nab hab sej -m pip nruab -U
sudo apt-tau nruab python-gi-cairo
6) Pab kom PiCamera:
> ntaus hauv Terminal: sudo raspi-config
> Nyem rau 5 Qhov Kev Xaiv Ua Ntej tom qab ntawm P1 Lub Koob Yees Duab ces qhib lub koob yees duab interface thiab rov pib dua
7) Txuag Python Script lapser.py thiab cov ntaub ntawv pov thawj.json ntawm koj li Raspberry Pi:
Rub tus nab nab ntawv lapser.py muab rau hauv no Instructable.lapser.py yog tsab ntawv uas yuav ua kom tua lub sijhawm lapse. Kuv tau muab tso ua ke los ntawm kev luam qee cov lej ntawm tus lej pom hauv online (Kuv muab cov chaw nyob ntawm lub vev xaib uas siv hauv tsab ntawv). credentials.json yog cov ntaub ntawv uas koj tau txais hauv qib kawg ntawm Tshooj 1 khaws nws nrog lapser.py hauv daim nplaub tshev Cov ntaub ntawv ntawm koj li Raspberry Pi.
8) Tsim kom muaj kev lees paub nrog koj li Google Drive:
lapser.py muaj tag nrho cov lus qhia txhawm rau tsim thawj qhov kev lees paub nrog koj tus lej Google nrog daim ntawv thov uas koj tau tsim hauv Tshooj 1. Nws xa cov ntaub ntawv pov thawj khaws cia hauv daim ntawv pov thawj.json rau Google thiab qhib koj lub vev xaib kom koj tuaj yeem nkag mus hauv koj li Google Account thiab tso cai rau koj lub app nkag mus rau koj li Google Drive. Thaum qhov no ua tiav, Google muab Token rau peb uas Lapser.py txuag hauv koj Cov Ntaub Ntawv ua cov ntaub ntawv hu ua token.pickles uas yuav siv los tsim kev sib txuas yam tsis muaj koj cov tswv yim yav tom ntej.
Ua lapser.py, ntaus hauv Terminal:
> cd Cov ntaub ntawv
thiab tom qab ntawd:
> python lapser.py
Nkag mus rau hauv koj tus lej Google thiab tso cai rau koj daim ntawv thov nkag mus rau Google Drive.
Tom qab cov kauj ruam no, txheeb xyuas tias koj Raspberry Pi tab tom thaij duab thiab khaws cia rau hauv koj li Drive.
9) Nco ntsoov tias koj li Raspberry Pi ua tiav lapser.py ntawm khau raj yam tsis muaj tus neeg siv nkag mus:
Txhawm rau tso cai rau koj Raspberry Pi khiav lapser.py thaum khau raj, peb qhia nws kom qhib lub davhlau ya nyob twg thaum nws tau pib thiab khiav lapser.py thaum lub dav hlau qhib:
Txhawm rau qhia Pi kom qhib lub davhlau ya nyob twg ntawm khau raj peb hloov kho cov ntaub ntawv autostart. Ntaus hauv qhov hais kom ua qhov rai:
> sudo nano/etc/xdg/lxsession/LXDE-pi/autostart
Tom qab ntawd ntaus @lxterminal tam sim ntawd saum toj no '@xscreensaver' kab. Txuag thiab kaw los ntawm kev ntaus ctrl+x ces y ces nkag mus.
Txhawm rau khiav lapser.py thaum lub davhlau ya nyob twg qhib peb kho cov ntaub ntawv.bashrc. Ntaus hauv qhov hais kom ua qhov rai:
> sudo nano /home/pi/.bashrc
Nqes mus rau qhov kawg ntawm cov ntawv thiab ntaus:
echo khiav ntawm khau raj
sudo python /home/pi/Documents/lapser.py
Txuag thiab kaw los ntawm kev ntaus ntawv: ctrl+x ces y ces nkag mus.
10) Tsiv qee pob khoom ncig:
Tam sim no lapser.py yuav khiav ntawm khau raj. Txawm li cas los xij, cov pob nws xav tau tam sim no tau khaws tseg hauv qhov chaw nws nkag tsis tau (/home/pi/.local/lib/python3.5/site-packages). Yog li peb yuav tsum txav cov pob ntawd mus rau qhov chaw nws tuaj yeem nkag tau (/usr/lib/python3.5/dist-packages). Txhawm rau txav cov pob ntawd, ntaus cov lus txib hauv qab no hauv koj lub Raspberry Pi davhlau ya nyob twg:
> sudo cp -a /home/pi/.local/lib/python3.5/site-packages/. /usr/lib/python3.5/dist-packages/
Koj tuaj yeem tshawb xyuas tias cov pob ntawd tau txav los ntawm kev mus rau qhov chaw ntawd nrog tus tswj xyuas cov ntaub ntawv. Koj yuav tsum tau nyem rau sab xis thiab xaiv Qhia Qhia Thaum Ua.local tshwm sim hauv tus thawj tswj ntaub ntawv.
Nov yog qhov kawg ntawm ntu no! Cov ntu tom ntej yuav dhau los ua qhov me ntsis ntxiv: peb yuav tsim lub thawv thiab txuas Raspberry Pi kom pib tua peb lub sijhawm!
Kauj Ruam 3: Tsim Lub Thawv
Taw qhia rau cov kauj ruam no:
Lub sijhawm zoo tshaj plaws raug tua nyob rau hauv ib puag ncig teeb pom kev uas tsis muaj ib qho txav deb ntawm qhov uas koj tab tom ua. Koj tuaj yeem siv txhua qhov chaw uas lub teeb pom kev tsis hloov pauv ntau yam xws li lub thawv ntawv loj, lub txee rau khoom, chav cia khoom ntev li koj teeb tsa yuav tsis muaj kev cuam tshuam thoob plaws hauv qhov kaw.
Lub tshuab txiav laser yuav tso cai rau koj los tsim lub thawv kom zoo nrog qhov ntev zoo meej rau koj teeb tsa. Txawm li cas los xij, koj tsis xav tau qee yam zoo nkauj los tua lub sijhawm zoo. Koj tseem tuaj yeem siv txhua qhov chaw uas lub teeb pom kev tsis hloov pauv ntau yam xws li lub thawv ntawv loj, lub thawv ntawv, chav cia khoom …
1) Tsim koj lub thawv.
Kuv siv lub tshuab txiav laser (Trotec Speedy 360) los tsim lub thawv (hauv 6mm MDF ntoo) uas tsis tsuas yog muaj qhov ntev me me tab sis kuj muaj f*cking zoo tsim.
Nco ntsoov tias koj lub npov yuav tsum siab txaus kom lub koob yees duab tuaj yeem ntes koj qhov xwm txheej tag nrho. Siv kab rov tav thiab ntsug ntawm kev saib ntawm picamera txhawm rau kwv yees siab npaum li cas koj lub koob yees duab yuav tsum tau txhawm rau txhawm rau ntes qhov koj tab tom ua.
Kuv siv Ua Ib Lub Thawv nrog qhov ntev hauv qab no (Dav: 303mm, Ntev: 453mm, Qhov tob (= Qhov siab): 350mm, Dav dav dav: 6mm) kom tau txais cov phiaj xwm. Kuv ntxiv ob peb lub qhov rau Picamera thiab cov xov hlau thiab tseem tau kos qee cov duab trippy txias pom ntawm Freepik.
2) Sib sau koj lub thawv
3) Mount Picamera
Muaj lub koob yees duab ruaj khov uas tsis txav mus thoob koj qhov kev tua yog qhov tseem ceeb heev kom tau txais lub sijhawm zoo saib. Tom qab sim kab xev, 3D-luam PiCamera rooj plaub thiab lwm tus, Kuv tau los nrog qhov ua kom zoo rau ob qho tib si teeb tsa lub koob yees duab thiab khaws nws ruaj khov nyob rau sab saum toj ntawm lub thawv. Kuv siv 3 cov ntsia hlau uas yog xov tsuas yog ntawm lawv cov lus qhia. Qhov tseem tsis tau nyeem yog ib qho hla ntawm qhov tob ntoo thaum cov xov xov mus rau hauv lub qhov picamera. Thaum tig cov ntsia hlau, cov xov xov yuav txav PiCamera kaum los ze dua lossis deb ntawm qhov chaw ntawm lub npov. Qhov no tso cai rau koj kom meej thiab khov kho teeb tsa lub kaum sab xis ntawm koj lub koob yees duab txhawm rau ntes koj lub scene.
Thov nco ntsoov tias qhov no yog qhov muaj txiaj ntsig tshaj plaws ntawm Cov Lus Qhia no raws li qhov chaw hloov pauv thiab lub kaum sab xis xav tau kom haum qhov sib xws ntawm Picamera. Nws yog qhov zoo tshaj plaws uas koj tau ua thawj zaug ntawm cov ntoo seem ua ntej koj pib khawb qhov thoob ntawm koj lub thawv zoo nkauj!
Kauj Ruam 4: Txuas Lub Teeb Pom Kev rau RaspberryPi
Taw qhia rau cov kauj ruam no:
Tshooj lus no saib xyuas kev thaiv koj lub teeb pom kev, koj li 5V txuas thiab Raspberry Pi los ntawm nws GPIO.
Tseem ceeb: Kuv tsis paub ntau txog kev ua haujlwm nrog hluav taws xob thiab hluav taws xob siab (Kuv tsuas yog kws tshawb fawb keeb kwm yav dhau los). Kuv tsis tuaj yeem lav qhov kev nyab xeeb ntawm kev qhia no thiab ntawm kev teeb tsa zaum kawg. Ceev faj tshwj xeeb rau kev phom sij thiab thaum ua haujlwm nrog qhov hluav taws xob siab!
Koj tuaj yeem saib ntawm no kom nyeem ntxiv txog yuav ua li cas 5V kev xa xov ua haujlwm thiab ntawm no rau kev qhia tag nrho ntawm kev tswj hwm RaspberryPi's GPIO.
Koj yuav pom tias kuv tsis suav nrog ib tus neeg tiv thaiv hauv Circuit Court uas ua rau lub teeb ci. Qhov no yog vim xav tias cov hlua LED hauv nws twb muaj lawv lawm.
Sib nrug ntawm qhov ntawd, nws yog txhua yam ntawm daim vis dis aus!
Kauj Ruam 5: Tua Sijhawm Lapses
Thiab koj ua tiav!
Muaj kev lom zem thiab qhia koj cov txuj ci hauv cov lus!
Pom zoo:
RGB Lub Sijhawm Qhia Cov Menyuam Txog Lub Sijhawm: 4 Kauj Ruam
RGB Mloog Qhia Cov Menyuam Txog Lub Sijhawm: Hmo kawg kuv tau los nrog lub tswv yim yuav pab kuv li 5 xyoos kom nkag siab lub sijhawm. feem ntau yog me ntsis ntawm kev tsis sib haum thiab tsis tshua muaj nyob rau hauv kev txiav txim.Thaum tellin
WiFi Lub Sijhawm, Lub Sijhawm & Chaw Huab Cua, Blynk Tswj: 5 Cov Kauj Ruam (nrog Duab)
WiFi Clock, Timer & Weather Station, Blynk Tswj: Qhov no yog Morphing digital moos (ua tsaug rau Hari Wiguna rau lub tswvyim thiab hloov pauv tus lej), nws tseem yog lub moos sib piv, chaw qhia huab cua thiab lub sijhawm ua noj. Blynk app ntawm koj lub smartphone los ntawm WiFi. Lub app tso cai rau koj
Siv DS1307 thiab DS3231 Lub Sijhawm Teev Sijhawm Sijhawm Nrog Arduino: 3 Kauj Ruam
Siv DS1307 thiab DS3231 Lub Sijhawm Caij Nyoog Sijhawm Nrog Arduino: Peb tseem tau txais kev thov yuav siv DS1307 thiab DS3231 lub sijhawm teev sijhawm nrog Arduino los ntawm ntau qhov chaw-yog li qhov no yog thawj ntawm ob ntu kev qhia yuav siv li cas. Txog qhov kev qhia Arduino no peb muaj ob lub sijhawm teev sijhawm ua haujlwm rau peb
Lub Sijhawm Teem Sijhawm Teem Sijhawm ntawm RaspberryPi-4: 6 Cov Kauj Ruam (nrog Duab)
Lub Sijhawm Teem Sijhawm Teem Sijhawm ntawm RaspberryPi-4: Hauv Cov Lus Qhia no peb yuav ua lub ntsej muag-paub lub sijhawm tiag tiag ntawm Raspberry Pi 4 nrog Shunya O/S siv Shunyaface Library. Koj tuaj yeem ua tiav qhov ntsuas pom ntawm 15-17 ntawm RaspberryPi-4 los ntawm kev ua raws cov lus qhia no
Lub Tsheb Tshem Tawm Rau Lub Sijhawm Lapse Lub Koob Yees Duab: 5 Kauj Ruam
Detachable Tsheb Mount rau Lub Sijhawm Lapse Lub Koob Yees Duab: https://www.instructables.com/id/Camera_for_time_lapse_pictures_made_easy/ Nov yog cov yeeb yaj kiab kuv tau ua nrog lub sijhawm lapse lub koob yees duab uas qhia hauv qhov txuas saum toj no .http: //www.youtube.com /saib? v = AWh46mqROkQQhov qhia no yog ntau lossis tsawg dua txuas ntxiv ntawm kuv