Cov txheej txheem:

Ua DashCam Siv Raspberry Pi Zero (pt.1): 3 Cov Kauj Ruam
Ua DashCam Siv Raspberry Pi Zero (pt.1): 3 Cov Kauj Ruam

Video: Ua DashCam Siv Raspberry Pi Zero (pt.1): 3 Cov Kauj Ruam

Video: Ua DashCam Siv Raspberry Pi Zero (pt.1): 3 Cov Kauj Ruam
Video: WiFi Dash Camera, SIV Car Dash Cam Full HD 2024, Kaum ib hlis
Anonim
Ua DashCam Siv Raspberry Pi Zero (pt.1)
Ua DashCam Siv Raspberry Pi Zero (pt.1)

Nov yog qhov pib ntawm koob tshiab uas peb kawm paub tsim lub dashcam siv Raspberry Pi Zero. Qhov haujlwm no yeej yog cov kaw video txuas mus ntxiv thiab tuaj yeem siv rau lwm daim ntawv thov suav nrog kev saib xyuas tsiaj qus.

Hauv ntu 1, peb daws qhov kaw qhov kaw, uas cuam tshuam nrog kev yees duab los ntawm Pi lub koob yees duab thiab khaws cia rau hauv daim npav microSD. Peb kuj saib xyuas cov ntaub ntawv tus lej, kuaj xyuas qhov seem khaws cia, nres tsab ntawv yog tias nws qis thiab peb tseem ntxiv FTP ua haujlwm kom nkag tau cov ntaub ntawv nyob deb.

Cov vis dis aus siv sijhawm saib ze li cas txhua yam tuaj ua ke thiab peb kuj tsim qee qhov ntawv xeem uas pab nkag siab tsab ntawv kawg. Kuv xav pom zoo kom saib cov vis dis aus ua ntej kom nkag siab zoo dua ntawm txoj haujlwm.

Kauj Ruam 1: Npaj Raspberry Pi

Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi
Npaj Raspberry Pi

Thawj qhov peb yuav tsum tau ua yog rub tawm Raspbian operating system rau Raspberry Pi. Kuv tab tom siv Pi Zero rau qhov haujlwm no vim nws yog pawg thawj coj saib. Kuv tseem yuav tsis siv lub desktop thiab yog vim li cas kuv thiaj rub tawm cov lite version. Tom qab ntawd koj yuav tsum nyem qhov duab no rau daim npav microSD tab sis ua ntej peb tuaj yeem khau raj Pi nrog nws, peb yuav tsum luam the wpa_supplicant.conf thiab ssh cov ntaub ntawv rau khau raj tsav. Cov ntaub ntawv no xav tau los tso cai rau peb tswj hwm Raspberry Pi nyob deb. Lwm qhov kev xaiv yog siv kev txuas txuas thiab txuas cov keyboard/nas/zaub los tswj hwm Pi. Qhov kev xaiv yog koj li thiab ntawm no yog qhov txuas rau kab ntawv yav dhau los uas piav qhia qhov no ntau ntxiv nrog rau kev nkag mus deb thiab FTP: https://www.instructables.com/id/Remotely-Accessing-the-Raspberry-Pi-SSH-Dekstop -FT/

Nov yog cov ntsiab lus yuav ua li cas thiaj teeb tsa qhov no:

Cov ntaub ntawv wpa_supplicant.conf muab cov ntsiab lus network uas tso cai rau Pi txuas rau koj lub network WiFi - qhov no xav tau los nruab software thiab tseem tswj hwm nws tam sim no. Kev sib txuas WiFi tsuas yog xav tau thaum pib teeb tsa thiab peb tsis xav tau nws los kaw video thaum nyob hauv tsheb. Koj tuaj yeem siv qhov txuas hauv qab no txhawm rau rub cov ntawv ua qauv rau qhov no. Cias hloov kho koj lub teb chaws tus lej, lub npe network thiab tus password thiab tom qab ntawd luam nws hla mus rau daim npav microSD. Koj tuaj yeem siv cov ntawv nyeem zoo li notepad ++, Sublime Text lossis Atom los hloov cov ntaub ntawv.

Cov ntaub ntawv WPA tus qauv:

Siv qhov txuas hauv qab no rau cov npe ntawm lub tebchaws cov lej:

Tom qab ntawv peb yuav tsum tsim cov ntaub ntawv khoob nrog lub npe ssh siv koj cov ntawv sau uas koj nyiam. Tsis txhob ntxiv ib qho txuas ntxiv rau hauv cov ntawv thiab tsuas yog luam nws mus rau pawg thawj coj saib. Thaum ua tiav, txuas lub koob yees duab, ntxig daim npav microSD thiab tom qab ntawd muab lub zog rau ntawm lub rooj tsavxwm. Pawg thawj coj yuav siv sijhawm li ib feeb los txuas rau koj lub network thawj zaug.

Ua ntej peb tuaj yeem mus txuas ntxiv, peb yuav tsum tau txais tus IP chaw nyob rau pawg thawj coj saib. Ib txoj hauv kev los ua qhov no yog siv software hu ua AngryIP scanner. Nruab thiab khiav qhov ntawd thiab tom qab ntawd koj tuaj yeem tau txais lub rooj tsav xwm tus IP chaw nyob.

Peb yuav tsum tau nkag mus rau hauv pawg thawj coj los ntawm kev siv lub davhlau ya nyob twg (lossis hais kom sai hauv Windows). Cias ntaus hauv "ssh [email protected]" thiab ntaus nkag. Nco ntsoov siv koj lub rooj tsav xwm tus IP chaw nyob. Ntaus tus password tsis raug uas yog raspberry thiab tom qab ntawd koj yuav nkag mus rau lub rooj tsavxwm.

Tam sim no peb yuav tsum ua ob peb yam ua ntej peb tuaj yeem pib nrog tsab ntawv. Thawj qhov yog ua kom lub koob yees duab uas tuaj yeem ua tiav los ntawm kev khiav "sudo raspi-config" hais kom ua. Koj yuav tsum tau mus rau "Kev xaiv cuam tshuam", tom qab ntawd "Lub Koob Yees Duab" thiab pab kom nws. Siv lub tab tseem ceeb los xaiv qhov "Finish" kev xaiv thiab tom qab ntawd rov pib dua lub rooj tsavxwm. Muab lub rooj tsavxwm ib feeb thiab tom qab ntawd rov nkag rau hauv.

Peb tom qab ntawd yuav tsum hloov kho Raspbian kev ua haujlwm thiab qhov no tuaj yeem ua tiav los ntawm kev khiav "sudo apt hloov tshiab && hloov kho -y" hais kom ua. Tom qab ntawd, teeb tsa proftpd los ntawm kev khiav "sudo apt install proftpd" hais kom ua. Qhov no teeb tsa FTP software uas tso cai rau peb nkag mus saib cov ntaub ntawv ntawm daim npav microSD. Koj tuaj yeem qhib FileZilla, thiab txuas rau lub rooj tsavxwm uas yuav tso cai rau koj nkag mus saib cov ntaub ntawv.

Kauj ruam 2: Tsim Tsab Ntawv

Tsim Tsab Ntawv
Tsim Tsab Ntawv
Tsim Tsab Ntawv
Tsim Tsab Ntawv

Peb tau tsim cov ntawv sau yav dhau los uas muaj.sh txuas ntxiv, cov no yog cov ntawv sau tsis raug. Rau txoj haujlwm no, peb yuav tsim cov ntawv nab nab uas yuav muaj.py txuas ntxiv mus. Kev siv nab nab muab rau peb nkag mus rau ntau cov qauv, cov tsev qiv ntawv thiab cov ntawv sau uas ua rau nws yooj yim dua rau peb los tsim cov phiaj xwm.

Peb thawj zaug yuav tsum teeb tsa lub picamera module kom peb tuaj yeem siv lub koob yees duab hauv peb cov ntawv sau. Qhov no tuaj yeem ua tiav los ntawm kev khiav "sudo apt install python-picamera" hais kom ua. Thaum qhov ntawd ua tiav, yooj yim tsim tsab ntawv nab nab los ntawm kev khiav "sudo nano dashcam.py" thiab tom qab ntawd ntaus cov ntsiab lus los ntawm cov ntawv hauv qab no:

www.bitsnblobs.com/wp-content/media/fw/diy/e26-dashcam.py

Koj tseem tuaj yeem luam/muab cov ntsiab lus uas yog ib qho txiaj ntsig ntawm kev siv SSH. Koj tuaj yeem txuag cov ntawv los ntawm kev ntaus "CTRL+X", tom qab ntawd Y, tom qab ntawd nkag mus. Thov saib cov vis dis aus txhawm rau piav qhia tag nrho nws ua haujlwm li cas ua ke. Peb kuj tsim ob tsab ntawv ntxiv ua ntej qhov no kom nkag siab zoo dua.

Kauj Ruam 3: Xeem Tsab Ntawv

Xeem Tsab Ntawv
Xeem Tsab Ntawv

Ua ntej peb tuaj yeem sau tsab ntawv, peb yuav tsum teeb tsa psutil module raws li peb siv qhov ntawd kom tau txais kev siv disk. Txhawm rau txhawm rau nruab psutil, peb thawj zaug yuav tsum teeb tsa qee yam hu ua pip uas yog pob installer rau nab hab sej. Qhov no tuaj yeem ua tiav los ntawm kev khiav "sudo apt install python-pip" hais kom ua, tom qab ntawv "pip install psutil" hais kom ua uas yuav nruab psutil.

Thaum ua tiav, tsim daim nplaub tshev tshiab los ntawm kev ua haujlwm "mkdir videos" hais kom ua thiab tom qab ntawd peb tuaj yeem yooj yim khiav "python dashcam.py" hais kom ua uas yuav ua haujlwm tsab ntawv. Koj yuav tsum muaj peev xwm saib cov ntaub ntawv raug tsim raws li qhia hauv daim duab. Koj tseem tuaj yeem tau txais lawv siv FileZilla thiab ua si rov qab siv VLC. Koj tuaj yeem tso tseg tsab ntawv los ntawm kev ntaus "CTRL+C" thiab nws tau pom zoo kom rov pib dua lub rooj tsavxwm.

Cov vis dis aus rau ntu 2 yuav mus nyob rau lub lim tiam tom ntej, nrog rau cov ntawv sau los nrog nws. Thov tsis txhob txiav txim siab tso npe rau peb YouTube channel vim nws pab txhawb nqa txoj haujlwm no.

YouTube:

Ua tsaug rau koj nyeem!

Pom zoo: