Cov txheej txheem:

Txheeb xyuas Raspberry Pi's Software: Ntu 2: 10 Cov Kauj Ruam
Txheeb xyuas Raspberry Pi's Software: Ntu 2: 10 Cov Kauj Ruam

Video: Txheeb xyuas Raspberry Pi's Software: Ntu 2: 10 Cov Kauj Ruam

Video: Txheeb xyuas Raspberry Pi's Software: Ntu 2: 10 Cov Kauj Ruam
Video: Начало → Изучайте английский → Освойте ВСЕ ОСНОВЫ АНГЛИЙСКОГО ЯЗЫКА, которые вам НУЖНО знать! 2024, Kaum ib hlis
Anonim

Los ntawm push_resetFollow Ntxiv los ntawm tus sau:

Chav Kawm Hluav Taws Xob Wearable
Chav Kawm Hluav Taws Xob Wearable
Chav Kawm Hluav Taws Xob Wearable
Chav Kawm Hluav Taws Xob Wearable
Raspberry Pi Chav Kawm
Raspberry Pi Chav Kawm
Raspberry Pi Chav Kawm
Raspberry Pi Chav Kawm
Yuav Ua Li Cas Txuas Werkstatt-01 mus rau Eurorack Module
Yuav Ua Li Cas Txuas Werkstatt-01 mus rau Eurorack Module
Yuav Ua Li Cas Txuas Werkstatt-01 mus rau Eurorack Module
Yuav Ua Li Cas Txuas Werkstatt-01 mus rau Eurorack Module

Hais txog: Tshwj xeeb hauv kev xaws khaub ncaws, txhuam thiab ua khoom noj txom ncauj. Ntau yam kuv ua … Kuv qhia kev sib tham sib zam thiab khaub ncaws hauv chav kawm hu ua Wearable thiab Soft Interactions ntawm California College of Arts. www.wearablesoftin… Ntau Txog push_reset »

Zaj lus qhia no yog txuas ntxiv ntawm koj txoj kev kawm kab lus txib. Raws li koj ua haujlwm nrog Raspberry Pi koj yuav tsis ntseeg qhov kev txhim kho software tshiab los kawm, sim, thiab tsim nrog. Hauv zaj lus qhia no, koj yuav kawm paub yuav teeb tsa software pob li cas thiab yuav tshawb xyuas thiab txhim kho lawv li cas. Koj tseem yuav sau thiab khiav koj thawj qhov haujlwm uas siv CLI!

Kauj Ruam 1: Txhim Kho Pob

Muaj ntau qhov lom zem thiab muaj txiaj ntsig software pob (pob rau luv) muaj rau siv ntawm Raspberry Pi. Txhawm rau rub tawm thiab teeb tsa pob khoom ntawm koj li Raspberry Pi koj yuav xub siv cov lus txib apt-get. Cov lus txib no yog siv los teeb tsa, tshem tawm, thiab hloov kho APT (Advanced Packaging Tool) pob khoom. Nws yog cov cuab yeej muab los ntawm OS Debian uas Raspbian tau tsim los ntawm. Qhov no txhais tau tias yog koj pom pob uas ua haujlwm rau Debian thiab Raspberry Pi's ARM6 architecture nws yuav zoo li ua haujlwm rau Raspbian.

Thoob plaws hauv koj qhov kev lom zem Raspberry Pi, koj yuav rub tawm ntau pob. ImageMagick yog pob software uas yuav siv tom qab hauv chav kawm yog li nws yog qhov zoo tshaj plaws los pib nrog.

Ua ntej txhim kho pob software, koj yuav tsum xub hloov kho Raspberry Pi cov npe tam sim no ntawm cov pob khoom uas muaj rau apt-tau nrog apt-tau hloov tshiab. Zoo li:

apt-tau hloov tshiab

Duab
Duab

Koj yuav tau txais qhov yuam kev hais tias "kev tso cai tsis pom zoo" thiab nug yog tias koj muaj hauv paus. Yog vim li cas? Txhawm rau ua cov kev hloov pauv no rau Raspberry Pi lub software, peb xav tau cov kev tso cai tso cai tsuas yog rau hauv paus superuser. Luckily, koj twb paub yuav ua li cas hauv paus thaum nkag mus ua tus neeg siv pi los ntawm kev siv sudo. Cov neeg siv nyiaj yam tsis muaj kev tso cai hauv paus yuav tsum nkag mus rau tus lej nkag mus rau hauv paus txhawm rau ua cov lus txib sudo.

sudo apt-tau hloov tshiab

Lub sijhawm no, qhov hloov tshiab yuav ua tiav.

Duab
Duab

Siv sudo ua ntej qhov hais kom ua.

Duab
Duab

Hloov tshiab tiav.

Tom qab hloov kho tshiab, koj tam sim no npaj rau nruab pob. Txhawm rau rub tawm ImageMagick siv apt-tau nrog kev teeb tsa hais kom ua ntxiv rau lub npe pob (tsis txhob hnov qab sudo!):

sudo apt-tau nruab imagemagick

Duab
Duab

Ua ntej cov txheej txheem ua tiav, koj yuav raug qhia ntau npaum li cas qhov chaw cia daim ntawv thov yuav siv thiab yog tias koj xav txuas ntxiv. Ntaus "y" rau yog thiab tom qab ntawd "nkag mus".

Duab
Duab

Ntaus "y" txhawm rau txuas ntxiv mus.

Duab
Duab

Nruab tiav.

Tom qab siv qhov hais kom ua nruab, koj yuav nquag nug yog tias koj xav txuas ntxiv qhov kev teeb tsa. Muaj qhov ua kom yuam kev kom nyob ib puag ncig xav tau ntaus "y" txhua lub sijhawm los txuas ntxiv cov txheej txheem. Siv tus chij -y Qhov no hu rau apt-get option uas muab qhov tsis siv neeg "yog" rau ib qho yog/tsis muaj lus qhia uas ua raws cov lus txib teeb tsa. Koj puas nco qab saib yuav ua li cas ntawm kab lus hais kom ua cov cuab yeej muaj rau siv?

Kev vam khom

Qee zaum thaum koj teeb tsa pob khoom lawv xav tau lwm pob khoom nruab rau ua haujlwm. Cov ntaub ntawv xav tau thiab pob khoom no hu ua kev vam khom. Tom qab ntawv, koj yuav kawm paub saib lub pob kev vam khom.

Kauj ruam 2: Uninstalling Pob

Txhawm rau tshem tawm thiab tshem tawm pob tag siv kev tshem tawm cov lus txib nrog apt-get. Qhov no yuav tshem tawm pob thiab tag nrho nws cov ntaub ntawv teeb tsa uas tuaj nrog kev teeb tsa.

sudo apt-tau tshem tawm pobName

Tom qab siv tshem tawm, siv cov lus txib autoremove tshem tawm ib pob ntawm Raspberry Pi uas tsis xav tau. Qhov no ua tiav vim tias nws yuav tshem tawm ib qho kev cia siab uas tuaj nrog thawj qhov kev teeb tsa ntawm pob uas koj tab tom ntxuav. Piv txwv li, yog tias koj teeb tsa pob Z, nws tuaj yeem teeb tsa pob X thiab Y txhawm rau Z ua haujlwm kom raug. Thaum koj siv tshem tawm kom tshem tawm pob Z nws tsis tshem pob X thiab Y. Autoremove ua li ntawd:

sudo apt-tau tshem tawm autoremove

Kauj Ruam 3: Yuav Ua Li Cas Tsim Cov Ntawv Teev Npe

Tsim thiab kho cov ntawv cov ntawv muaj txiaj ntsig lossis teeb tsa koj li Raspberry Pi thiab sau cov haujlwm. Muaj cov kab lus hais kom kho kab ntawv ib yam li muaj cov kws kho rau siv ntawm lub desktop ib puag ncig zoo li Nplooj ntawm Raspberry Pi thiab Microsoft Word ntawm Windows. Koj tuaj yeem sau, kho, thiab khaws cov ntawv sau siv cov kab hais kom ua editor Nano. Nano yog cov ntawv sau yooj yim uas tau teeb tsa ntawm ntau Linux distros suav nrog Raspbian. Nws yog ib qho yooj yim mus siv thiab heev beginner tus phooj ywg.

Cia peb pib los ntawm qhib cov ntaub ntawv tshiab:

nano

Qhov no qhib qhov tshiab tsis zoo uas zoo ib yam li cov ntawv sau tsis muaj npe. Nyob rau sab laug sab saud, koj yuav pom lub npe ntawm daim ntawv thov thiab tus lej version. Lub npe ntawm cov ntaub ntawv yog nyob rau sab saum toj chaw uas los ntawm lub neej ntawd hu ua "tshiab tsis". Hauv qab ntawm lub qhov rais, muaj peb kab. Cov kab saum toj kawg nkaus hais txog xwm txheej ntawm cov ntawv koj tab tom kho. Tam sim no, nws qhia peb tias cov ntawv peb tab tom kho yog "Cov Ntawv Tshiab". Ob kab hauv qab uas yog sau cov keyboard luv. Cov ntawv luv uas koj pom yog cov uas nquag siv tab sis muaj ntau ntxiv. Txhawm rau pom txhua qhov luv luv muaj thiab ntxiv cov lus piav qhia yuav siv lawv li cas, nias Ctrl + G. Qhov luv luv no coj los rau nplooj ntawv pab. Txhawm rau tawm ntawm nplooj ntawv pab nias Ctrl + X.

Duab
Duab
Duab
Duab

Raws li tau hais hauv nplooj ntawv pabcuam, kom txuag tau cov ntaub ntawv nyem Ctrl + O. Xwb, yog tias koj tawm Nano siv Ctrl + X koj yuav raug nug kom khaws cov ntawv ua ntej tawm.

Kauj Ruam 4: Tsim Cov Ntawv Plhaub

Txog tam sim no peb tau ua tiav ib kab lus txib. Cov lus txib tuaj yeem ua ke ua ke rau hauv ib daim ntawv, khaws tseg tom qab ntawd khiav los ntawm Raspberry Pi ua tiav lawv txhua tus los ntawm saum toj mus rau hauv qab. Qhov no hu ua tsab ntawv plhaub. Ib tsab ntawv tsuas yog cov ntawv sau uas muaj ntau cov lus txib thiab tau txais kev cawmdim nrog. Koj tuaj yeem tsim tsab ntawv siv ib qho ntawv sau tab sis txij li koj nyuam qhuav pom Nano, cia peb lo nrog nws.

Tsim cov ntawv sau tshiab hauv Nano npe helloMe los ntawm kev ntaus:

nano helloMe.sh

Rau thawj kab ntawm koj hom haujlwm:

#!/bin/sh

Kab no hu ua shebang. Nws txheeb xyuas koj cov ntawv ua ntawv raws li tsab ntawv uas Bash xav kom ua. Yog tias tus cwj pwm tsis zoo tshwm sim thaum koj sim ntaus #, rov xyuas koj cov txheej txheem teeb tsa keyboard.

Rau koj thawj tsab ntawv plhaub, koj yuav sau tsab ntawv timelapse rau lub koob yees duab module. Nws yuav cia li thaij ib daim duab tom qab txhua txhua 2 vib nas this tag nrho lub sijhawm 10 vib nas this.

Sau ob kab ntawv no hauv koj cov ntawv qhib:

raspistill -w 800 -h 600 -t 10000 -tl 2000 -o duab%02d.jpg

hloov -delay 10 -loop 0 duab*-j.webp

Wb mus saib dab tsi tshwm sim hauv ob kab no.

Los ntawm lub neej ntawd, lub koob yees duab siv cov duab nrog daws teeb meem ntawm 3280 × 2464 pixels ntawm 72 ppi (pixels ib nti). Qhov no loj heev thiab yog li ntawd, cov duab yuav siv sijhawm ntev dua los ua. Hauv Raspistill cov duab tuaj yeem hloov kho los ntawm kev hais txog qhov dav thiab qhov siab.

  • -w thiab -h tau siv los hloov qhov duab rau 800 x 600 pixels
  • -t hais qhia tag nrho cov sijhawm ntawm tag nrho cov txheej txheem siv hauv milliseconds
  • -tl nquag yees duab
  • -o tso tawm cov ntaub ntawv npe
  • duab%02d.jpg pib lub npe cov duab nrog duab ntxiv rau ob qhov chaw rau sab xis rau lub txee tsim Piv txwv li:

    • duab 00.jpg
    • duab 01.jpg
    • duab 02.jpg

Yog tias koj xav tias koj yuav siv ntau dua 99 daim duab koj tuaj yeem tsim 3 lossis txawm tias 4 qhov chaw yog li koj tuaj yeem txuag ntau txhiab tus duab siv duab%03d-j.webp

hloov pauv yog cov lus txib los ntawm ImageMagick. Kab ntawv no siv tag nrho cov jpegs khaws tseg nrog cov ntawv ua ntej ntawm cov duab thiab hloov lawv mus rau hauv cov tsiaj ntawv-g.webp

-loop 0 txhais tau tias-g.webp

Nias Ctrl + X kom tawm Nano thiab nias "y" kom txuag nws ob kab no raws li helloMe.sh.

Kauj ruam 5: Khiav Shell Script

Khiav Shell Script
Khiav Shell Script

Koj muaj koj thawj tsab ntawv tab sis nws tseem tsis tau npaj yuav khiav. Txhawm rau sau tsab ntawv yooj yim txhais tau tias pib. Ua ntej khiav lub plhaub tsab ntawv nws ua ntej yuav tsum tau ua kom tiav. Qhov no yog ua tiav los ntawm kev siv chmod +x nyob rau hauv ntej ntawm tsab ntawv lub npe.

chmod +x helloMe.sh

Thaum tau ua tiav, tsab ntawv tam sim no tau npaj los khiav. Nrhiav cov ncauj lus kom taw lub koob yees duab ntawm (koj tus kheej!) Thiab npaj tau. Nco ntsoov tias los ntawm lub neej ntawd lub koob yees duab yuav tso saib ua ntej 5 vib nas this ua ntej thaij duab. Nov yog lub sijhawm ntau npaum li cas koj yuav tau npaj ua ntej nws pib txhaj tshuaj.

Khiav tsab ntawv no los ntawm kev siv sh txib ua ntej tsab ntawv lub npe:

sh nyob zoo.sh

Xwb, koj tuaj yeem tso bash ua ntej lub npe qhia rau Raspberry Pi kom khiav nws siv Bash:

bash nyob zoo. Me.sh

Txhawm rau sau ib tsab ntawv koj yuav tsum tau nyob hauv tib phau ntawv teev npe uas nws tau txais kev cawmdim. Yog tias koj pom koj tsis nyob hauv tib phau ntawv teev npe siv cd mus rau qhov ntawd.

Txheeb xyuas kom pom cov duab thiab koj-g.webp

ls ua

Qhib lub animateMe-g.webp

xdg-qhib animateMe.gif

Kauj Ruam 6: Txhim Kho Pob Khoom

Kev txhim kho pob pob txhais tau tias hloov kho nws mus rau nws qhov tseeb version. Txhawm rau txhim kho txhua pob khoom ntawm Raspberry Pi qhov kev hais kom hloov kho tau siv. Ua ntej koj pib txhim kho, koj thawj zaug yuav tsum tau khiav apt-tau hloov tshiab:

sudo apt-tau hloov tshiab

sudo apt-tau hloov tshiab

Qhov no ua kom ntseeg tau tias txhua qhov muaj peev xwm vam khom rau cov software tshiab tau hloov kho tshiab thiab tuaj yeem tuaj yeem txhim kho ib qho yoov. Qhov kev hais kom hloov kho tshiab yuav siv ob peb feeb los ua kom tiav, thiab yuav xav tau koj kev txheeb xyuas/kev cuam tshuam thaum lub sijhawm txheej txheem, nyob ntawm seb pob ntawv twg tau raug kho dua tshiab. Siv kev hloov kho tshiab thiab hloov kho tas li yuav ua rau koj Raspberry Pi's OS cov duab hloov tshiab. Nws yog qhov tseem ceeb tib yam li rub tawm cov duab tshiab tshaj plaws ntawm Raspbian muaj.

Yog tias koj xav hloov kho pob tshwj xeeb tsuas yog rub nws dua:

sudo apt-tau nruab pobNameUWant2Update

Yog tias koj twb muaj qhov tshiab tshaj plaws ntawm pob ntawv APT yuav qhia rau koj hauv lub davhlau ya nyob twg qhov rai uas koj yog "… twb tau khiav qhov hloov tshiab kawg.."

Kauj Ruam 7: Nrhiav thiab Tshawb Pob

Muaj ntau txhiab pob khoom rub tawm rau Raspbian. Txhawm rau saib cov npe ntawm cov pob khoom muaj nyob ntawm no. Txhawm rau tshawb xyuas cov software no, koj siv lub cuab yeej apt-cache. Koj tuaj yeem siv apt-cache nrog cov lus txib txhawm rau nrhiav lwm cov ntaub ntawv hais txog pob tshwj xeeb lossis saib seb puas muaj ib qho thiab qhov kev vam khom nws xav tau ua haujlwm li cas. Cov npe hauv qab no yog qee qhov muaj txiaj ntsig apt-cache cov lus txib. Rau daim ntawv teev npe ua tiav mus ntsib linux.die.net.

Txhawm rau tshawb cov pob khoom muaj rau lo lus tseem ceeb, siv kev tshawb nrhiav ntxiv rau lo lus tseem ceeb koj xav tshawb rau:

apt-cache tshawb nrhiav nkauj

Qhov no yuav ua rau muaj cov npe khoom uas muaj lo lus "nkauj".

Duab
Duab

Nws tseem muab cov lus piav qhia luv luv tom ntej ntawm txhua qhov txiaj ntsig uas ua rau nws yog txoj hauv kev zoo los kawm paub ntau ntxiv txog pob tshwj xeeb yog tias koj twb paub lub npe lawm. Piv txwv li, Kuv pom pob ntawv hais hauv kab lus hu ua amsynth. Kom tau txais cov lus piav qhia luv luv ntawm nws yog dab tsi, kuv tuaj yeem ntaus:

apt-cache tshawb nrhiav amsynth

Duab
Duab

Rau qhov kev piav qhia ntev dua nrog rau tus lej xov tooj, qhov loj me, homepage, thiab ntau yam siv qhia:

apt-cache qhia amsynth

Duab
Duab

Txhawm rau tshawb nrhiav lub npe tshwj xeeb ntawm pob siv cov lus txib pkgnames. Yog tias nws muaj, nws yuav nthuav tawm nws tus kheej:

apt-cache pkgnames amsynth

Duab
Duab

Yog tias pob tau muaj kev vam khom cov ntawd yuav tsum tau rub tawm ib yam nkaus. Txhawm rau nrhiav qhov kev vam khom rau pob siv cov lus txib nyob nrog ntxiv rau lub npe pob.

apt-cache nyob ntawm amsynth

Duab
Duab

Kauj ruam 8: Kaw + Reboot Los ntawm CLI

Kev kaw thiab rov pib dua hauv LXTerminal yog txoj hauv kev nyiam rau chav kawm no thaum koj txuas ntxiv siv kab hais kom ua, tab sis koj tuaj yeem ua haujlwm zoo ib yam los ntawm kev siv nas thiab ua haujlwm.

Raws li tau hais ua ntej, Raspberry Pi's OS yuav tsum raug kaw kom raug kom tsis txhob muaj kev puas tsuaj. Txhawm rau kaw qhov system cuam tshuam nrog kev txiav txim kom raug ntawm txhua cov txheej txheem ntawm lub kaw lus nrog rau qee qhov haujlwm tseem ceeb hauv kev tu vaj tu tsev. Muaj plaub lo lus txib uas tuaj yeem ua txoj haujlwm no: nres, tshem tawm, rov pib dua, thiab kaw.

Nrog rau kev hais kom kaw, koj tuaj yeem hais qhia qhov twg ntawm cov kev ua uas yuav tsum tau ua (nres, fais fab tuag, lossis rov pib dua), thiab muab sijhawm ncua rau qhov kev kaw. Qhia meej "tam sim no" ua qhov xwm txheej tam sim ntawd. Txhawm rau kawm paub ntau ntxiv txog dab tsi ntawm plaub qhov lus txib ua saib ntawm lawv nplooj ntawv txiv neej.

Kaw

sudo nres

sudo kaw -h tam sim no

Thaum koj kaw lub kaw lus ACT LED ntawm Raspberry Pi yuav ntsais muag tom qab ntawd ua khov kho. Thaum nws ruaj khov tshem tawm lub hwj chim.

Rov pib dua

sudo rov pib dua

sudo kaw -r tam sim no

Kauj Ruam 9: Kho lub Raspberry Pi Los ntawm CLI

Nco qab thaum peb tau hla thiab teeb tsa Raspberry Pi los ntawm lub desktop GUI? Raspberry Pi kuj tseem tuaj yeem teeb tsa los ntawm CLI siv cov lus txib raspi-config:

sudo raspi-teeb tsa

Ntawm cov ntawv qhia zaub mov siv tus xub thiab nqis xub tuav kom txav mus raws cov kev xaiv. Siv tus xub xub kom xaiv Ua tiav thaum koj ua tiav thiab npaj tawm mus. Koj tsis tas yuav teeb tsa lwm yam rau chav kawm no tab sis tam sim no koj tau dhau los ua tus tshaj lij hauv LXTerminal koj tuaj yeem tso qhov no rau hauv koj lub hnab ris raws li txoj hauv kev teeb tsa Raspberry Pi.

Nov yog qhov piv txwv ntawm yuav ua li cas pab kom lub koob yees duab nrog raspi-teeb tsa (tsis xav tau los pab nws, koj twb tau ua hauv Cov Lus Qhia Teeb Teeb)

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Kauj ruam 10: Upload Duab

Tshaj tawm ib qho ntawm cov duab coj los ntawm kev khiav koj thawj lub plhaub ntawv (GIFs tsis txhawb nqa lub sijhawm no, hmoov tsis zoo).

Pom zoo: