Cov txheej txheem:

Pib Nrog BeagleBone Dub: 11 Kauj Ruam
Pib Nrog BeagleBone Dub: 11 Kauj Ruam

Video: Pib Nrog BeagleBone Dub: 11 Kauj Ruam

Video: Pib Nrog BeagleBone Dub: 11 Kauj Ruam
Video: Pib Tshiab Nrog Kuv- hu: CM XIONG Feat.NIKKI THAO [ Official Audio] 2023 2024, Kaum ib hlis
Anonim
Pib Nrog BeagleBone Dub
Pib Nrog BeagleBone Dub

Tom qab siv Arduino ib pliag, kuv txiav txim siab sim Beaglebone Dub. Pom qhov tsis muaj cov ntsiab lus ntawm Cov Ntawv Qhia, thiab muaj qee qhov nyuaj pib kuv tus kheej, Kuv xav pab lwm tus neeg teeb tsa BeagleBone Dub.

Kauj Ruam 1: BeagleBone Dub yog dab tsi?

BeagleBone Dub yog dab tsi?
BeagleBone Dub yog dab tsi?

BBB yog ib lub khoos phis tawj siv computer ua haujlwm Linux. Nws muaj 4GB onboard eMMC uas muaj Linux OS, nrog rau lub microSD qhov los khiav OS sib txawv, lossis hlawv nws mus rau eMMC. Nws muaj 512MB ntawm RAM, thiab tag nrho ntau ntawm I/O pins, suav nrog analog-rau-digital hloov pauv (ADC) thiab mem tes-dav-hloov pauv (PWM) pins. Nws kuj tseem muaj HDMI tso tawm, USB ntsaws (rau lub koob yees duab, keyboard/nas, thiab lwm yam) thiab lwm USB rau kev txuas rau lub khoos phis tawj, ethernet, LEDs-on-board, thiab 5V lub mloog pob ntseg.

Cov Lus Qhia no yuav npog txhua yam koj xav paub kom pib nrog koj li BBB, suav nrog SSHing rau nws los ntawm koj lub khoos phis tawj, txuas rau internet los ntawm koj BBB los ntawm koj lub computer txuas nrog internet, thiab pib siv onboard Linux OS.

Kauj Ruam 2: Yam Koj Xav Tau

Txhawm rau pib, koj yuav xav tau:

BeagleBone Dub (tau txais kuv li los ntawm Digikey, tab sis koj tuaj yeem tau txais nws lwm qhov)

USB cable (yuav tsum tuaj nrog BBB)

microSD (4GB lossis ntau dua)

Windows lub computer

PuTTY davhlau ya nyob twg emulator

Koj kuj tseem xav tau Linux nyob USB lossis CD

Kauj Ruam 3: Tau PuTTY

Tau PuTTY
Tau PuTTY

Koj yuav xav tau PuTTY rau SSH rau koj BBB, lossis txuas los ntawm COM chaw nres nkoj. Rub tawm nws ntawm no, tab sis nco ntsoov nws tsuas yog PuTTY, tsis muaj dab tsi tshwj xeeb ntxiv. Koj tuaj yeem xaiv lub installer, lossis tsuas yog ib qho ntawv.exe. Muab qhov luv luv tso rau ntawm koj lub khoos phis tawj, vim peb yuav siv nws ntau.

Kauj ruam 4: Txuas rau Computer

Txuas mus rau Computer
Txuas mus rau Computer
Txuas mus rau Computer
Txuas mus rau Computer
Txuas mus rau Computer
Txuas mus rau Computer

Rov pib dua koj lub khoos phis tawj Windows kom tso cai tsav tsheb tsis tau kos npe. Hauv WIndows 10 thiab 8.1, koj tuaj yeem tuav ua haujlwm thaum nias lub khawm Restart hauv cov ntawv qhia zaub mov, tom qab ntawd nyem qhov kev xaiv siab dua hauv cov ntawv qhia zaub mov rov pib dua. Hauv Windows 7, koj yuav tsum nkag mus rau Advanced Boot Menu thiab xaiv Disable Driver Signature Verification lossis qee yam zoo li ntawd. Rov pib dua thiab thaum lub vijtsam tawg tshwm, ntaus F8, F12, lossis Rho tawm, qhov twg los xij yog rau koj lub khoos phis tawj. Kuv tsis tuaj yeem npog txhua lub khoos phis tawj, tab sis nws yuav tsum ncaj ncaj rau pem hauv ntej.

Tom ntej no, txuas USB rau koj BBB, tom qab ntawd rau koj lub khoos phis tawj. Tos kom txog thaum BBB qhia pom tias yog tshem tau lossis tshem tawm lub suab nrov ntawm lub ntaus ntawv. Qhib Cov Ntaub Ntawv Explorer thiab mus rau BeagleBone Pib. Nws kuj tuaj yeem tshwm sim tam sim ntawd thiab. Ob npaug nias rau START.htm qhib lub vev xaib khaws tseg rau koj BBB. Scroll rau Kauj Ruam 2, thiab rub cov tsav tsheb tsim nyog, tej zaum Windows (64-ntsis), thiab qhib cov ntawv. Nyem yog ntawm Admin popup. Qhov kev teeb tsa no yuav tso cai rau koj txuas rau koj li BBB ua ib lub network hauv zej zog, tsim nyog rau kev nkag mus rau lub vev xaib tuav ntawm nws, thiab SSHing ncaj qha rau nws los ntawm koj lub computer. Tus installer no tsis tau kos npe, tab sis yuav tsum ua haujlwm vim tias peb xiam oob khab tsav tsheb pov thawj.

Tom qab cov neeg tsav tsheb teeb tsa, lub network tshiab hauv zej zog yuav tsum tshwm thiab txuas nrog txuas. Txhawm rau ntsuas qhov no, rov qab mus rau koj lub vev xaib nrog START.htm, nqes mus rau Kauj Ruam 3, thiab tso 192.168.7.2. Siv Chrome lossis Firefox, vim Internet Explorer yuav tsis ua haujlwm. Koj yuav tsum pom lub cim ntsuab loj. Yog tias yog, Zoo siab! Koj tau ua tiav teeb tsa lub network hauv cheeb tsam thiab tam sim no tuaj yeem txuas rau koj li BBB!

Kauj ruam 5: SSH

SSH
SSH
SSH
SSH
SSH
SSH

Ruaj Ntseg-Plhaub, lossis SSH, yog cov txheej txheem sib txuas siv los ua haujlwm ntawm cov network txuas nrog cov servers los ntawm txhua qhov chaw. Rau peb lub hom phiaj, koj yuav SSH rau koj BBB thaum nws txuas nrog koj lub khoos phis tawj, tab sis koj tseem tuaj yeem txuas rau nws nyob deb, tsuav yog BBB thiab koj lub khoos phis tawj nyob hauv tib lub network (nws muaj peev xwm txuas tau mus rau deb tiag tiag, tab sis yog teeb meem teeb tsa thiab tej zaum yuav tsis muaj kev nyab xeeb yog tias ua tsis raug.

Nrog koj BBB ntsaws rau hauv koj lub computer, qhib PuTTY. Koj yuav tsum pom daim duab tseeb raws li saud. Hauv lub lauj kaub loj, peb tuaj yeem xaiv ntawm SSH, Serial, thiab lwm yam. Peb yuav siv SSH thiab Serial. Nrog SSH xaiv, ntaus tus IP chaw nyob ntawm koj BBB. Hauv peb qhov xwm txheej, nws yog 192.168.7.2, vim nws xav tias nws txuas nrog lub network tuav los ntawm peb lub khoos phis tawj. Mus tom ntej thiab txuag qhov kev sib txuas hauv Cov Txiaj Ntsim Txim pane, npe nws txhua yam uas koj nyiam. Kuv npe nws BBB SSH Local. Ntaus Txuag, ces Qhib. Lub qhov rai yuav tsum tshwm tuaj, thiab ceeb toom kev nyab xeeb yuav tshwm sim. Tsis txhob txhawj!. Nws tsuas yog vim nws yog thawj zaug txuas rau koj li BBB. Nyem Yog, thiab tus ID nkag mus yuav tsum tshwm sim. Yog tias tsis yog, rov txheeb xyuas tus IP chaw nyob, thiab xyuas kom cov tsav tsheb raug teeb tsa kom raug. Txhawm rau nkag mus, nkag mus rau "hauv paus" (tsis muaj nqe lus), thiab ntaus Enter. Tseem tsis tau teeb tus password, tab sis peb yuav ua qhov ntawd tom qab. Yog tias koj pom qee cov ntawv nrog cov ntaub ntawv hais txog Beaglebone, tom qab ntawd koj tau ua tiav SSHed rau koj BBB!

Kauj ruam 6: Serial

Cov
Cov
Cov
Cov

Tej zaum koj yuav xav txuas rau koj li BBB los ntawm Serial chaw nres nkoj. Cov txheej txheem yuav luag zoo ib yam, koj tsuas yog yuav tsum xaiv qhov Serial xaiv hauv PuTTY. Nkag mus rau COM chaw nres nkoj ntawm koj BBB (pom nws hauv Tus Thawj Tswj Ntaus Ntawv hauv Windows), sau 115200 raws li Tus Nqi Baud, thiab nyem Qhib. Nkag mus "hauv paus" rau tus neeg siv. Tsis muaj tus password tshwj tsis yog tias koj teeb tsa. Cov neeg siv/tus lej sib txuas ua ke zoo ib yam rau SSH thiab Serial, koj tsis tas yuav teeb tsa cov neeg siv sib cais, lawv ua haujlwm thoob plaws ob qho txuj ci.

Kauj Ruam 7: Thawj Kauj Ruam hauv Linux

Thawj Kauj Ruam hauv Linux
Thawj Kauj Ruam hauv Linux

Tshwj tsis yog tias koj muaj kev paub dhau los nrog Linux thiab nws lub davhlau ya nyob twg, nws tuaj yeem yooj yim pom tons ntawm cov ntawv thiab tsis muaj cov nyees khawm, ntawv qhia zaub mov, lossis lwm yam duab. Tsis txhob txhawj! Koj yuav tau siv nws, thiab koj yuav kawm paub yuav xav li cas los ntawm lub davhlau ya nyob twg. Kuv yuav tsis hla txhua qhov lus txib, tab sis ntawm no yog qee qhov hauv paus uas koj yuav siv los pib:

passwd - Siv los teeb tus password tshiab rau tus neeg siv nkag. Pom zoo ua thawj lo lus txib txhawm rau tiv thaiv teeb meem kev nyab xeeb.

pwd - Sau Cov Haujlwm Ua Haujlwm. Siv los luam txoj hauv kev ntawm cov npe (ntawv tais ceev tseg) koj nyob hauv

ls - Siv los teev cov ntsiab lus ntawm cov npe ua haujlwm (nplaub tshev)

cd - Hloov cov npe. Siv zoo li "cd cov ntaub ntawv" yog cov npe "cov ntaub ntawv" nyob hauv cov npe ua haujlwm, lossis "cd /hauv paus /cov ntaub ntawv". Siv tsuas yog "cd" rov qab mus rau koj cov npe hauv tsev (tam sim no /hauv paus), thiab "cd.." kom nce qib.

ntau dua - Siv kom ncov ntawm cov ntawv yam tsis tau qhib nws. Siv "ntau myFile" kom nce siab ntawm cov ntsiab lus ntawm cov ntaub ntawv "myFile."

ifconfig - Luam tawm cov ntaub ntawv hais txog kev sib txuas hauv is taws nem.

Cov lus txib no yuav pab koj tshawb xyuas lub davhlau ya nyob twg thiab txhua cov npe thiab cov ntaub ntawv uas khiav Linux OS. Tsis txhob ntaus cov cim random, zoo li koj tsis paub thaum twg koj tuaj yeem tsoo qee yam. Koj tau nkag mus rau hauv raws li tus neeg siv hauv paus, sib npaug ntawm Tus Thawj Coj hauv Windows, tab sis nws tsis qhia koj kom lees paub qhov hloov pauv. Nws tsuas yog ua rau lawv. Muaj ntau qhov peev txheej hauv online thiab hauv phau ntawv (leej twg nyeem cov ntawv ntxiv lawm) uas tuaj yeem pab koj taug kev lub davhlau ya nyob twg. Kuv tsis tuaj yeem teev txhua lo lus txib thiab yuav siv lawv li cas (peb yuav nyob ntawm no ib pliag), yog li yog tias koj xav tau ua qee yam, saib online kom pom cov lus txib.

Kauj Ruam 8: Txuas rau Is Taws Nem ntawm Koj BBB

Txuas rau Is Taws Nem ntawm Koj BBB
Txuas rau Is Taws Nem ntawm Koj BBB
Txuas rau Internet ntawm Koj BBB
Txuas rau Internet ntawm Koj BBB
Txuas rau Internet ntawm Koj BBB
Txuas rau Internet ntawm Koj BBB
Txuas rau Is Taws Nem ntawm Koj BBB
Txuas rau Is Taws Nem ntawm Koj BBB

Yog tias koj nkag mus rau qhov hais kom ua:

ping 192.168.7.1

koj yuav tsum tau txais txiaj ntsig, nrog koj BBB pinging koj lub khoos phis tawj (uas yog lub qhov rooj ntawm BBB lub network me hauv zos). Tab sis yog tias koj ua qee yam xws li:

pib 8.8.8.8

pinging Google DNS server, koj yuav tau txais qhov yuam kev, qee yam zoo li tsis muaj kev sib txuas hauv network. Qhov no yog vim tias koj lub khoos phis tawj tsis dhau nws qhov kev txuas internet txuas mus rau BBB. Peb yuav tsum qhia peb lub khoos phis tawj kom ua li ntawd. Yog li, hauv Windows, mus rau Network thiab Chaw sib koom. Ntawm sab laug pane, nyem Change Adapter Settings. Koj yuav tsum pom koj li kev sib txuas hauv is taws nem, feem ntau yog Wi-nkaus, lan, lossis Ethernet. Koj yuav tsum pom koj BBB, rau kuv nws yog Ethernet 3, Linux Usb Ethernet. Peb yuav tsum tso cai tsheb khiav los ntawm BBB kom xa los ntawm peb lub khoos phis tawj kev sib txuas. Txhawm rau ua qhov no, nyem rau ntawm lub vev xaib txuas uas muaj kev sib txuas, rau kuv nws yog Wi-nkaus adapter, thiab nyem Properties. Tej zaum koj yuav xav tau cov cai ntawm Admin. Mus rau Kev Sib Koom tab, thiab kos rau lub network tso cai sib koom lub thawv. Hauv cov ntawv qhia zaub mov nco tseg, xaiv koj qhov kev sib txuas BBB, rau kuv Ethernet 3. Nyem Ok. Tom ntej no, peb yuav tsum hloov qee qhov ntawm BBB qhov kev sib txuas. Txoj cai nyem rau koj BBB qhov kev sib txuas, thiab nyem Properties. Ob npaug nias Internet Cov Cai Txheej Txheem 4 (TCP/IPv4), thiab khij lub npov kom tau txais IP chaw nyob thiab DNS server tau txais. Nyem Ok, tom qab ntawd Ok.

Yog tias koj tau txuas nrog koj li BBB los ntawm SSH, tom qab ntawd PuTTY qhov rais tuaj yeem yuam kev vim kev hloov pauv hauv network. Tsuas yog kaw nws, tom qab rov qhib lwm qhov txuas SSH. Peb tsis tuaj yeem siv internet tau tseem, vim tseem muaj qee qhov kev hloov pauv xav tau hauv BBB. Nkag mus rau tus neeg siv hauv paus zoo li ua ntej, thiab nkag mus rau cov lus txib hauv qab no:

/sbin/route ntxiv default gw 192.168.7.1

Txoj kev no BBB kev siv internet hla lub USB network hloov chaw Ethernet chaw nres nkoj. Tam sim no koj yuav tsum tuaj yeem ping 8.8.8.8, Google tus DNS server. Tab sis yog koj sim

pib ping google.com

nws yuav yuam kev tawm. Yog tias yog, sau cov hauv qab no:

ncha "nameserver 8.8.8.8" >> /etc/resolv.conf

ntxiv Google DNS server rau hauv cov npe ntawm cov npe hauv BBB. Tam sim no koj yuav tsum muaj peev xwm ping google.com. Yog tsis yog, sau:

nano/etc/network/interfaces

thiab ntxiv "dns-nameservers 8.8.8.8" mus rau qhov kawg ntawm cov ntawv, ua kom ntseeg tau tias tsis muaj tabs ua ntej nws ntawm tib kab.

Yog tias koj txhawj xeeb, koj tseem yuav tuaj yeem txuas koj lub BBB rau hauv Ethernet chaw nres nkoj, vim qhov kev hloov pauv peb tau ua tsuas yog zoo kom txog rau thaum rov pib dua tom ntej. Koj yuav tau ua raws cov kauj ruam no ntxiv hauv koj rov pib dua lossis kaw thiab tshem tawm ntawm koj lub khoos phis tawj.

Vim li cas, Kuv tau muaj teeb meem nrog lub network tsis ua haujlwm thaum kuv rov txuas kuv lub BBB rau kuv lub khoos phis tawj tom qab. Kuv tsuas yog xiam thiab rov qhib tau kev sib koom ntawm kuv lub khoos phis tawj thiab rov pib dua IPv4 teeb tsa rau kuv BBB kev sib txuas. Txog thaum kuv pom kev daws teeb meem, yog tias qhov no tshwm sim, tsuas yog rov ua cov kauj ruam no.

Kauj Ruam 9: Tsis Kawg

Yog tias koj tau txais qhov no deb, nrog koj zoo siab! Koj zoo ntawm koj txoj hauv kev los ua cov phiaj xwm txaus nrog BBB. Txij ntawm no mus, muaj ob peb txoj hauv kev los coj:

  1. Tsom ntsoov rau Linux cov phiaj xwm nrog C ++, Nab hab sej, lossis ntau ntawm lwm yam lus txhawb los ntawm BBB
  2. Tshawb xyuas GPIO (cov hom phiaj dav dav nkag/tso tawm, lub taub hau loj dub ntawm ob sab ntawm BBB) thiab cuam tshuam nrog cov khoom sab nrauv
  3. Ua haujlwm nrog lub vev xaib hosting thiab kev sib tham los ua lub vev xaib lossis cov ntaub ntawv server
  4. Lwm yam uas koj tuaj yeem xav txog!

Ua rau cov lus qhia tseeb uas koj tuaj yeem mus, Kuv yuav tsis txuas ntxiv ntau dhau, tab sis koj tuaj yeem siv C/C ++, cov lus hloov pauv yam lus, lossis Python, zoo rau cov pib, lossis Bonescript, BBB's Javascript, kuj muaj ntau yam ntxiv -oriented. Muaj ntau txoj hauv kev muaj peev xwm, thiab cov neeg siv-hauv paus ntawm BBB tau nce zuj zus. Yog tias koj muaj lub tswv yim, saib ib puag ncig online, lossis hauv phau ntawv. Kev tshawb nrhiav Beaglebone los ntawm Derek Molloy yog cov peev txheej zoo rau kev kawm paub ntau ntxiv txog BBB, thiab kev sau nrog C ++. Muaj lwm phau ntawv, saib ntawm no, ntawm BeagleBoard pib nplooj ntawv. Scroll rau hauv qab rau cov phau ntawv.

Tus so ntawm Cov Lus Qhia no yuav daws teeb meem yog thiab thaum koj ntsib teeb meem. Kuv vam tias yuav ntxiv rau nws ntxiv tom qab, tab sis kuv yuav pib tam sim no. Kuv koj muaj teeb meem, xav tawm tswv yim, thiab kuv yuav sim pab qhov zoo tshaj plaws Kuv tuaj yeem ua tau.

Kauj Ruam 10: Rov Ua Dua Tshiab Onboard EMMC

Yog tias koj tsoo qee yam hauv BBB cov ntaub ntawv kaw lus, koj yuav tsum tau rov ua dua ntawm onboard eMMC, lub cim xeeb uas tuav OS. Nws yog qhov nyuaj me ntsis, thiab kuv tau ntsib teeb meem thawj zaug nyob ib puag ncig. Yog tias koj muaj lub qhov rais, nws nyuaj rau hloov daim npav SD, yog li koj yuav xav tau Linux Linux USB ntawm CD.

Ua ntej, rub daim duab tshiab los ntawm no. Rub tawm thawj qhov nkag, hauv Kev Pom Zoo Debian Duab, Jessie rau BeagleBone. Nyob ntawm koj qhov kev sib txuas, rub tawm yuav siv sijhawm me ntsis; nws loj heev Lub caij no, rub 7-zip los ntawm no, xaiv qhov tsim nyog los ntawm cov npe. Nruab nws, raws li koj yuav xav tau nws rau unzip Debian duab. Thaum cov duab tau rub tawm tiav, qhib nws nrog 7-zip (nws yuav yog.xz cov ntaub ntawv), thiab rho tawm nws qhov twg koj yuav pom nws. Tom ntej rub tawm SDFormatter ntawm no thiab teeb tsa, thiab Win32DiskImager los ntawm no, thiab teeb tsa (tsis yog koj tsuas yog nyiam tag nrho cov cuab yeej me me no?). Ntxig koj daim npav SD rau hauv koj lub computer thiab qhib SDFormatter. Format koj daim npav SD, xyuas kom tseeb tias nws yog koj daim npav SD hauv lub npov nco. Thaum qhov ntawd ua tiav, qhib Win32DiskImager, nyem lub pob xauj ntawm sab xis, thiab pom cov ntawv rho tawm. Xaiv cov ntawv, xaiv koj daim npav SD hauv lwm lub thawv ntawv, thiab nyem sau. Qhov no yuav siv sijhawm ib pliag, yog li mus nrhiav khoom noj txom ncauj, pw ib hmos, thiab yaum koj saib TV uas koj nyiam tshaj.

Thaum nws ua tiav, koj yuav tsum kaw koj lub khoos phis tawj thiab khau raj rau hauv Linux USB lossis CD nyob (lwm cov lus qhia hauv online piav qhia yuav ua li cas thiaj li ua tau). Thaum Linux thauj khoom, nrhiav koj daim npav SD, thiab qhib /boot/uEnv.txt, thiab nrhiav kab uas hais tias:

## pab kom BBB: eMMC Flasher:#cmdline = init =/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

thiab hloov nws mus rau:

## pab kom BBB: eMMC Flasher: cmdline = init =/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Txuag nws, thiab tom qab ntawd tshem daim npav SD. Txuas nws rau hauv koj daim npav BBB sd daim npav, thiab ua kom lub zog ntsaws, tuav lub pob khau raj kom txog thaum koj pom cov LEDs teeb. Cov LEDs yuav tsum pib ntsais muag rov qab. Yog tias lawv yog, tom qab ntawd BBB tab tom teeb duab tshiab rau ntawm onboard eMMC. Tam sim no tos. Nrhiav lwm qhov khoom noj txom ncauj thiab ua tiav qhov kev lom zem-saib koj cov yeeb yam. Rov qab los thaum lub teeb tsaus ntuj, thiab tshem daim npav SD. Kos rau daim npav sd hauv qee txoj hauv kev kom nco koj tias nws yog lub teeb ci, lossis hloov kho kab rov qab mus rau qhov qub. Vim tias koj tseem tuaj yeem khau raj rau hauv daim npav SD yam tsis muaj lub ntsej muag, koj tsis xav kom rov ua rau koj lub BBB yuam kev.

Lwm txoj hauv kev los kho kab flasher int /boot/uEnv.txt yog txhawm rau khau raj rau daim npav SD, tuav lub pob khau raj ntawm lub zog nce, thiab kho cov ntaub ntawv ncaj qha los ntawm BBB. Kuv ntseeg tias nws nyob ntawm qhov muab tshem tawm disk thaum koj ntsaws nws rau hauv koj lub computer. Kuv tsis tau ua qhov no, tab sis nws yuav tsum ua haujlwm, thiab koj tsis tas yuav khau raj rau Linux. Yog tias leej twg ua qhov no thiab nws ua haujlwm, qhia rau kuv paub thiab kuv yuav muab tso rau ntawm no raws li qhov kev xaiv pom zoo.

Kauj Ruam 11: Cov Kauj Ruam Tom ntej

Yog tias koj muaj lus nug, xav tawm tswv yim. Yog tias koj muaj teeb meem, kuv tuaj yeem sim pab. Kuv xav tshaj tawm ntau txoj haujlwm siv BBB, tab sis kuv kuj yog tus pib ntawm kuv tus kheej. Vam tias qhov no tau pab koj pib, thiab kuv tsis tuaj yeem tos kom ntau BBB cov phiaj xwm tau tshaj tawm hauv Cov Lus Qhia.

Pom zoo: