Cov txheej txheem:

Ntxiv Aux rau Sonos Siv Raspberry Pi: 26 Cov Kauj Ruam (nrog Duab)
Ntxiv Aux rau Sonos Siv Raspberry Pi: 26 Cov Kauj Ruam (nrog Duab)

Video: Ntxiv Aux rau Sonos Siv Raspberry Pi: 26 Cov Kauj Ruam (nrog Duab)

Video: Ntxiv Aux rau Sonos Siv Raspberry Pi: 26 Cov Kauj Ruam (nrog Duab)
Video: Наука о данных с Python! Анализ типов файлов от Avro до Stata 2024, Kaum ib hlis
Anonim
Ntxiv Aux rau Sonos Siv Raspberry Pi
Ntxiv Aux rau Sonos Siv Raspberry Pi

Kuv ib txwm tau nyiam los ntawm Raspberry Pi tab sis tsis tau muaj qhov xav tau tiag tiag rau ib txog tam sim no. Peb muaj peb ntu Sonos hauv peb lub tsev: Ua Si 5 hauv chav nyob, Ua Si 3 hauv chav pw thiab Sonos CONNECT: AMP txhawb lub suab sab nraum zoov ntawm peb lub sam thiaj. Nrog lawv peb tuaj yeem mloog txhua yam tshwj tsis yog peb lub xov tooj cua hauv xov tooj cua uas tsis ntws hauv Is Taws Nem. Kuv muaj lub xov tooj cua saum toj saud nyob rau hauv kuv lub chaw haujlwm uas muaj kab tawm thiab xav kom tuaj yeem mloog nws thoob plaws lub tsev feem ntau yog tshaj tawm xov xwm kis las. Kuv tuaj yeem ua tiav qhov no los ntawm kev yuav lwm Tus Ua Si 5 lossis Txuas thiab siv nws kab-hauv tab sis kuv tsis muaj chav txaus hauv kuv lub chaw haujlwm me me lossis kuv tsis xav nqis peev nyiaj ntau ntxiv tsuas yog kom muaj peev xwm ntawd. Kuv txiav txim siab kawm paub yuav ua haujlwm li cas Raspberry Pi txhawm rau ntxiv kab hauv-kab rau peb cov neeg hais lus Sonos. Kuv tau sau Cov Lus Qhia no rau ua kom tiav Raspberry Pi NOOB, uas kuv tau txog rau tsuas yog ob peb hnub dhau los, nrog qhov kuv xav tias yog qhov yooj yim tshaj plaws, tsawg kawg ntawm cov kauj ruam tsim nyog kom muaj Raspberry Pi tau pib ua haujlwm nyob 320 kbps tso suab mp3 kwj. rau Sonos hauv vib nas this ntawm kev pib. Qhov no kuj yog txoj hauv kev zoo tshaj plaws los mloog koj lub turntable thoob plaws lub tsev ntawm Sonos.

Kauj ruam 1:

Duab
Duab
Duab
Duab

Koj yuav xav tau dab tsi:

Raspberry PI 3 Qauv B 1.2GHz 64-ntsis plaub-core ARMv8 CPU, 1GB RAM

Lub khoos phis tawj lossis lub khoos phis tawj laptop nrog lub microSD daim npav nyeem ntawv

Saib lossis TV nrog HDMI cov tswv yim (rau kev teeb tsa thawj zaug nkaus xwb)

USB lossis bluetooth keyboard thiab nas (rau kev teeb tsa thawj zaug nkaus xwb)

BEHRINGER U-CONTROL UCA202 Sab Nraud USB Soundcard (muaj lub tso suab tso suab RCA)

los yog

Pheej yig $ 10 USB lub tso suab tso suab

Hloov tshiab: Yog tias koj muaj lub tshuab tig nrog USB tawm koj tuaj yeem tuaj yeem ntsaws qhov ntawd rau hauv Pi thiab siv qhov ntawd "daim npav suab" thiab ua ntej yuav Behringer zoo rau nws

Kho kom raug: Kuv tsis paub tias Behringer muaj lwm tus qauv rau tus nqi tib yam hu ua BEHRINGER U-PHONO UFO202 uas muaj built-in Phono preamp rau turntables

Raspberry Pi daim npav lub suab tsis muaj suab tawm tswv yim thiab muaj tsawg tsawg sab nraud USB suab daim npav uas muaj lub tso suab tso suab. Kuv qhov kev xaiv thib ob yog lub suab tso suab "lub kaus mom" uas ntsaws rau hauv Raspberry's GPIO pins tab sis kuv nrhiav tsis tau rooj plaub rau nws thiab kuv yeej nyiam qhov zoo thiab ua haujlwm ntawm Flirc Raspberry Pi rooj plaub.

Flirc Raspberry Pi Case Gen2 (Tus Qauv Tshiab) (cov ntaub ntawv txhuas ua raws li cua sov)

Mediabridge 3.5mm Txiv neej rau 2-Txiv neej RCA Adapter (6 Taw) (yog tias koj lub suab sib piv muaj RCA tso tawm ces koj tsis xav tau qhov no)

Kingston 8 GB microSDHC Class 4 Flash Memory Card

Micro B USB Cable - Sab laug -Lub Kaum

Kauj ruam 2:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Nkag mus rau https://www.raspberrypi.org/downloads/noobs ntawm koj lub khoos phis tawj qub thiab rub tawm NOOBS_v2_4_4.zip. Nws yog cov ntawv loj dua (~ 1.4 GB). Luam cov ntsiab lus ntawm cov ntawv zip rau koj daim npav microSD. Kuv pom nws tau sau sai dua rau kuv daim npav SD los ntawm kev rho tawm cov ntawv mus rau ib ntus thiab tom qab ntawd luam lawv mus rau daim npav ntau dua li rho tawm ncaj qha rau daim npav.

Kauj ruam 3:

Duab
Duab

Ntxig daim npav microSD nrog cov ntaub ntawv muab rho tawm rau hauv daim npav SD ntawm sab hauv qab ntawm Raspberry Pi. Txuas tus HDMI cable los ntawm Raspberry Pi rau koj lub monitor lossis TV. Txuas USB keyboard, nas, ethernet cable (lossis koj tuaj yeem teeb tsa Wi-nkaus tom qab), USB lub suab (daim npav Behringer tsis xav tau software ntxiv lossis tsav tsheb) thiab thaum kawg Micro USB fais fab cable.

Kauj ruam 4:

Duab
Duab
Duab
Duab
Duab
Duab

Tus Pi yuav khau raj mus rau lub operating system teeb tsa lub vijtsam. Xaiv tsuas yog Raspbian thiab nyem Nruab. Nws yuav siv sijhawm ib pliag los nruab. Thaum lub sijhawm kuv teeb tsa me ntsis lub teeb pom kev zoo lub cim yuav tshwm sim tsis tu ncua ntawm sab xis saum toj ntawm lub vijtsam. Kev tshawb fawb online tau tshaj tawm tias yog Pi tau nkag mus rau microSD daim npav ntau lossis lwm yam ua haujlwm hnyav (thiab txhawb lub zog USB sab nraud daim npav hauv peb cov ntaub ntawv) thiab koj tab tom siv nws siv USB cable txuas rau hauv lub computer (tsis yog USB tshwj xeeb lub zog muab khoom siv.) koj tuaj yeem pom lub cim ntawd uas qhia tias muaj zog me ntsis. Nws zoo ib yam nkaus thiab yuav tsum tsis cuam tshuam dab tsi. Tom qab OS ua tiav kev teeb tsa koj yuav tau txais kab lus pom zoo sib tham. Nyem OK thiab Pi yuav rov pib dua.

Kauj ruam 5:

Duab
Duab
Duab
Duab

Tom qab nws rov pib dua Raspbian desktop yuav tshwm. Thawj qhov peb yuav tsum tau ua yog teeb tus lej nkag hauv paus. Nyem rau lub cim cim dav dav nyob rau sab laug sab saud ntawm lub vijtsam thiab ntaus "sudo passwd root" (yam tsis muaj nqe lus) thiab ntaus nkag. Ntaus hauv "raspberry" (tsis muaj tus hais) raws li tus password, ntaus nkag thiab tom qab ntawd ntaus nws dua thiab ntaus nkag mus kom paub meej. BTW, cov lus txib "sudo" sawv rau "super user do" thiab tso cai rau koj ua cov lus txib ua tus siv super aka tus neeg siv hauv paus.

sudo passwd hauv paus

Kauj Ruam 6:

Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb yuav ua kom muaj VNC server built-in. Qhov no ua rau ntau yam yooj yim dua li koj tuaj yeem yooj yim luam thiab muab lo lus txib ntawm VNC ntau dua li ntaus lawv. Xaiv GUI Ntawv qhia zaub mov (me me raspberry ntawm lub luag haujlwm)> Nyiam> Raspberry Pi Kev teeb tsa> cuam tshuam Nyem Enabled ib sab ntawm VNC thiab tom qab ntawd OK. Tom qab ob peb vib nas this lub cim VNC yuav tshwm rau ntawm lub luag haujlwm. Nyem rau nws thiab tom qab ntawd cov ntawv qhia zaub mov nyob ntawm sab xis saum toj (lub npov nrog 3 kab kab rov tav) thiab tom qab ntawv Xaiv. Hauv Kev Ruaj Ntseg xaiv teeb tsa Kev Nkag Mus rau "Nyiam dua" thiab Kev Pov Thawj raws li "VNC password". Ib lub box password yuav tshwm tuaj. Nkag mus rau "raspberry" (yam tsis muaj nqe lus) rau tus lej nkag mus rau txhua lub npov thiab nyem OK. Koj yuav tau txais lub thawv ceeb toom thib ob uas koj yuav tsum nyem OK kom paub meej. Peb tab tom teeb tsa lub suab tso tawm, tsis khaws cov lej nuclear:)

Kauj ruam 7:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Ua ntej peb mus ntxiv peb yuav tsum tau muab tus IP chaw nyob zoo li qub. Yog tias koj tus IP's IP chaw nyob raug xaiv los ntawm koj tus router DHCP server, tom qab ntawd tus IP chaw nyob tuaj yeem hloov pauv tom qab thiab koj yuav tsis tuaj yeem txuas ntawm VNC (lossis Sonos rau qhov teeb meem ntawd). RIGHT-click lub network sib txuas lub cim ntawm lub luag haujlwm (lub cim me me thiab nqes xub) thiab xaiv "Wireless thiab Wired Network Settings". LEFT-nyem rau sab xis sab xis thiab xaiv "eth0" los teeb tsa ethernet kev txuas lossis "wlan0" rau wireless. Kuv yuav qhia kom muab tus IP zoo li qub rau ib lossis lwm qhov. Kuv muaj teeb meem thaum kuv teeb tsa kuv tus Pi thawj zaug uas kuv tau muab tus IP zoo ib yam rau ob qho kev sib txuas thiab kuv Pi lub wireless kaw thiab kuv tsis tuaj yeem rov ua haujlwm tau zoo yog li kuv yuav tsum pib dua txhim kho OS. Txawm li cas los xij, sau tus IP chaw nyob uas koj xav tau hauv tus IP chaw nyob thiab nkag mus rau koj li router tus IP chaw nyob hauv Router thiab DNS Servers teb. Nyem Thov thiab Kaw.

NCO TSEG: Nws yuav yooj yim dua rau tus IP chaw nyob zoo li siv koj tus router DHCP IP qhov tshwj xeeb yog tias nws muaj. Koj yuav xav tau MAC chaw nyob ntawm Pi lossis nws tsuas yog tshwm nyob rau hauv cov npe khoom siv sib txuas ntawm koj tus router tus thawj tswj hwm nplooj ntawv. Yog tias koj xav tau MAC chaw nyob ces ntaus qhov hais kom ua "ifconfig eth0" hauv lub qhov rai qhov rai rau ethernet lossis "ifconfig wlan0" rau WiFi. Qhov txaus siab txaus WiFi's MAC chaw nyob yuav tshwm ntawm kab uas pib nrog "ether"

Kauj ruam 8:

Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb yuav tsum teeb tsa lub vijtsam daws teeb meem. Qhov no yuav zoo li tsis pom zoo li cas peb twb tau txuas nrog lub saib tab sis tom qab thaum koj txuas ntawm VNC yam tsis muaj lub saib txuas (tsis muaj lub taub hau, raws li lawv hais) nws yuav rov qab mus rau Pi lub neej ntawd 640x480 daws teeb meem uas yog lub vijtsam me me rau ua haujlwm nrog! Xaiv GUI Ntawv qhia zaub mov> Nyiam> Raspberry Pi Kev teeb tsa> teeb tsa kev daws teeb meem. Teeb nws rau 1280x720 lossis siab dua thiab nyem OK thiab Yog kom rov pib dua.

Kauj ruam 9:

Duab
Duab
Duab
Duab
Duab
Duab

Txij ntawm no mus koj yuav xav pib siv VNC los tswj hwm Pi. Qhib VNC tswj vaj huam sib luag ntawm Raspbian desktop dua thiab nrhiav tus IP chaw nyob hauv qab "Kev Sib Txuas". Nruab thiab khiav VNC tus saib ntawm koj lub khoos phis tawj qub thiab siv tus IP chaw nyob ntawd txuas thiab nkag mus rau "raspberry" (yam tsis muaj nqe lus) ua tus password. Kuv siv TightVNC rau Windows. Tom qab koj tau txuas nrog koj tuaj yeem txuag Pi's VNC kev sib txuas ua qhov luv ntawm koj lub desktop kom txuas sai sai yav tom ntej hla dhau lub vijtsam nkag. Koj yuav tau txais lus ceeb toom txog kev khaws tus password hauv qhov luv. Ib zaug ntxiv, cov cai. Txhawm rau luam thiab muab tso rau hauv Pi lub davhlau ya nyob twg, xaiv lossis hais qhia cov ntawv lossis cov lus txib ntawm koj lub khoos phis tawj qub, ntaus Ctrl-C (cia li ntaus Ctrl thiab C qhov tseem ceeb ntawm koj cov keyboard tib lub sijhawm) lossis nyem sab xis thiab xaiv "Luam ", tom qab ntawd qhib lub Pi's VNC tus saib qhov rai thiab RIGHT-click hauv lub davhlau ya nyob twg qhov rai sab xis ntawm tus cursor thiab xaiv Paste.

Kauj ruam 10:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb yuav sim ntsuas daim npav suab kom paub tseeb tias nws ua haujlwm tau zoo. Txuas lub suab nyob mus rau hauv USB daim npav suab RCA kab nkag. Qhib lub davhlau ya nyob twg qhov rai thiab ntaus hauv "arecord -l" (uas yog tus ntawv me "L") thiab ntaus nkag. Qhov ntawd yuav teev koj cov khoom siv daim npav suab txuas nrog. Tus lej tom qab lo lus "daim npav" yog koj tus lej ntaus ntawv. Hloov tus lej ntawd hauv cov lus txib tom ntej tom qab lo lus "plughw:" Hauv kuv qhov xwm txheej kuv daim npav npav yog "1" yog li kuv tau ntaus hauv (tau theej theej thiab muab siv VNC) "arecord -D plughw: 1, 0 -f cd temp. yav ". Qhov ntawd yuav pib sau CD-zoo.wav cov ntaub ntawv los ntawm daim npav daim npav lub tswv yim. Tom qab ob peb feeb tsoo Ctrl-C (cia li ntaus Ctrl thiab C qhov tseem ceeb ntawm koj cov keyboard tib lub sijhawm) kom tsis txhob kaw. Txhawm rau ua nws rov qab koj yuav tsum tau ntsaws lub mloog pob ntseg rau hauv lub mloog pob ntseg nyob ntawm Raspberry Pi daim npav nws tus kheej lossis lub mloog pob ntseg ntawm sab nraud USB daim npav suab. RIGHT-click tus hais lus icon ntawm tus neeg ua haujlwm thiab xaiv cov khoom sib xws koj tsuas yog ntsaws koj lub mloog pob ntseg rau thiab tig lub ntim (Analog = Raspberry Pi lub mloog pob ntseg nkaus; USB AUDIO CODEC = Sab nraud USB lub mloog pob ntseg lub mloog pob ntseg). Ntaus hauv "aplay temp.wav" thiab ntaus nkag thiab koj yuav tsum hnov qhov koj nyuam qhuav kaw. Daim npav suab ntawm Pi tsis zoo heev yog li yog tias koj tau mloog los ntawm nws lub mloog pob ntseg lub mloog pob ntseg, tsis txhob poob siab yog tias nws tsis zoo txhua yam. Peb cov kwj suab yuav yog txhua yam digital thiab yuav ua suab zoo ntawm Sonos.

cov -l

arecord -D plughw: 1,0 -f cd temp.wav

ua si temp.wav

Kauj ruam 11:

Duab
Duab
Duab
Duab

Tom ntej no peb yuav teeb tsa ob txoj haujlwm, Darkice thiab Icecast2. Darkice yog dab tsi yuav nkag mus rau peb cov suab nyob hauv lub kwj mp3 thiab Icecast2 yog dab tsi uas yuav ua haujlwm rau Sonos raws li Shoutcast kwj. Ntaus txhua kab ntawm no hauv lub qhov rai davhlau ya nyob twg ib zaug ua raws los ntawm tus yuam sij nkag mus txhua lub sijhawm:

wget

mv darkice_1.0.1-999 ~ mp3+1_armhf.deb? raw = tseeb darkice_1.0.1-999 ~ mp3+1_armhf.deb

sudo apt-tau nruab libmp3lame0 libtwolame0

sudo dpkg -i darkice_1.0.1-999 ~ mp3+1_armhf.deb

Kauj ruam 12:

Duab
Duab
Duab
Duab
Duab
Duab

Tam sim no rau nruab Icecast2. Ntaus hauv "sudo apt-get install icecast2" ua raws los ntawm kev nkag mus. Tom qab nws teeb tsa lub qhov rais yuav tshwm tuaj nug yog tias koj xav teeb tsa Icecast2. Ntaus tus xub xub laug thiab nkag mus xaiv Yog. Ntawm lub vijtsam thib ob ntaus tus xub xub nqis thiab nkag mus xaiv OK siv lub npe qub qub "localhost". Ntawm peb lub vijtsam tom ntej no ntaus tus xub xub thiab nkag tus yuam sij kom pom zoo siv "hackme" raws li lub hauv paus chiv keeb, kev xa xov thiab kev tswj hwm tus password. Txawm hais tias peb tau pom zoo rau txhua qhov kev teeb tsa ua ntej, cov kauj ruam no yuav tsum ua kom tiav los qhib lub Icecast2 server.

sudo apt-mus nruab icecast2

Kauj ruam 13:

Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb yuav tsum tau khiav GUI tus thawj tswj ntaub ntawv ua tus siv hauv paus. Txhawm rau ua qhov no, xaiv GUI Ntawv Qhia> Khiav. Ntaus hauv "sudo pcmanfm" thiab ntaus nkag. Qhov ntawd yuav qhib tus thawj tswj hwm cov ntaub ntawv (sib npaug ntawm cov ntaub ntawv tshawb fawb rau peb cov neeg siv Windows) mus rau cov npe hauv tsev (/tsev/pi) thiab koj yuav pom cov ntaub ntawv teeb tsa qhov tsaus ntuj uas peb tau rub tawm yav tas los nrog rau cov ntaub ntawv temp.wav peb tsim los sim daim npav suab. RIGHT-nyem rau ntawm qhov chaw khoob hauv lub qhov rai tshawb nrhiav thiab xaiv Tsim Tshiab thiab tom qab ntawd khoob Cov Ntaub Ntawv. Npe nws "darkice.cfg" thiab nyem OK. Tom qab ntawv RIGHT-nyem qhov ntawv tsim tshiab thiab xaiv qhib nws nrog Leafpad (sib npaug ntawm Windows notepad). Luam cov kab hauv qab no thiab muab tshuaj txhuam rau hauv Leafpad ces nyem Cov Ntaub Ntawv thiab Txuag. Cov teeb tsa kuv tau xaiv yog rau qhov zoo tshaj plaws mp3 kwj tab sis koj yuav xav tweak lawv kom qis dua qhov chaw yog tias koj yuav tau tshaj tawm sab nraum koj lub network piv txwv. Internet. Xyuas kom tseeb tias koj daim npav npav suab raug nyob hauv kab "ntaus ntawv = plughw: 1, 0" Koj yuav pom tias kab "zoo" tau hais tawm nrog tus # nyob ntawm nws xub ntiag. Nws tsuas yog siv yog tias koj teeb tsa "bitrateMode = vbr" (sib txawv bitrate). Koj tsis tuaj yeem muaj qhov txiaj ntsig zoo teeb tsa thaum siv cbr (qhov bitrate tsis tu ncua) lossis cov kwj deg yuav hais tsis tau thiab hla. Kuv tsuas yog nrhiav pom lub pov haum me me no tom qab ntau teev ntawm kev ntxhov siab. Kuv xav tias qhov txiaj ntsig zoo yuav tsis quav ntsej yog tias koj tau siv cbr tab sis nws hloov tawm uas tsis yog qhov xwm txheej tiag tiag thiab cuam rab hmuv ciaj rau hauv txoj haujlwm. Hloov pauv, yog tias koj txiav txim siab siv vbr ces koj yuav tsum tawm tswv yim tawm "kab lus = 320" kab thiab tsis pom zoo kab "zoo".

[dav dav]

ntev = 0 # ntev hauv s, 0 ib txhis tsisSecs = 1 # tsis, hauv vib nas this rov txuas dua = yog # rov txuas dua yog tias txuas tsis tau [nkag mus] ntaus ntawv = plughw: 1, 0 # Soundcard ntaus ntawv rau lub suab input sampleRate = 44100 # tus qauv tus nqi 11025, 22050 lossis 44100 bitsPerSample = 16 # khoom channel = 2 # 2 = stereo [icecast2-0] bitrateMode = cbr # qhov me ntsis tus nqi ('cbr' tsis tu ncua, 'abr' nruab nrab) #quality = 1.0 # 1.0 yog qhov zoo tshaj plaws (siv xwb nrog vbr) hom ntawv = mp3 # hom ntawv. Xaiv 'vorbis' rau OGG Vorbis bitrate = 320 # bitrate server = localhost # lossis IP chaw nres nkoj = 8000 # chaw nres nkoj rau IceCast2 nkag lo lus zais = hackme # tus lej lo lus zais rau IceCast2 server mountPoint = rapi.mp3 # taw tes rau ntawm IceCast2 server.mp3 lossis.ogg lub npe = Raspberry Pi

Kauj ruam 14:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb xav tau ua raws tib cov kauj ruam ib yam li ua ntej los tsim cov ntawv khoob hu ua "darkice.sh". Cov ntaub ntawv.sh yog qhov sib npaug ntawm.bat lossis cov ntaub ntawv rau DOS lossis Windows. Qhib siv Leafpad, luam thiab muab kab hauv qab no tseg thiab txuag.

#!/bin/tsoo

sudo/usr/bin/darkice -c /home/pi/darkice.cfg

Kauj ruam 15:

Duab
Duab

Tom ntej no peb yuav tsum tau hais kom ua kom darkice.sh cov ntaub ntawv ua tiav. Qhib lub davhlau ya nyob twg qhov rai thiab ntaus hauv "sudo chmod 777 /home/pi/darkice.sh" thiab ntaus nkag. Tam sim no nws yog lub sijhawm los pib ua haujlwm Icecast2 server. Ntaus hauv "sudo service icecast2 start" thiab ntaus nkag.

sudo chmod 777 /home/pi/darkice.sh

sudo kev pabcuam icecast2 pib

Kauj ruam 16:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Tom ntej no peb yuav tsum qhia Darkice kom pib ua haujlwm thaum twg Pi tau khau raj (Icecast2 server ua haujlwm raws li kev pabcuam thiab twb pib ua haujlwm tomqab pib). Ua ntej peb yuav tsum xaiv cov ntawv kho qhov twg los siv. Hauv lub davhlau ya nyob twg qhov rai hom "xaiv-editor" thiab ntaus nkag. Ntaus "2" los xaiv tus nano editor thiab ntaus nkag. Tom qab ntawv ntaus "crontab -e" thiab nkag mus. Tom ntej tuav tus yuam sij xub nqes nqes mus rau txhua txoj hauv kev rau hauv qab ntawm kab ntawv uas tshwm thiab ntxiv kab no "@reboot pw 10 && sudo /home/pi/darkice.sh". Tom qab ntawd ntaus Ctrl-X kom tawm thiab nws yuav hais kom "Txuag hloov kho tsis?". Ntaus tus yuam sij Y rau Yog ces nkag mus kom paub meej tias lub npe ntawv twg yog qhov tau txais. Kev pw tsaug zog 10 hloov qhia Pi kom tos 10 vib nas this tom qab pib ua ntej pib lub suab kwj. Qhov no muab sijhawm rau OS los pib ua daim npav USB. Yog tias koj pib kwj dej ua ntej USB daim npav suab ua haujlwm, cov kwj dej yuav tsis pib.

xaiv-editor

crontab -e

@reboot pw tsaug zog 10 && sudo /home/pi/darkice.sh

Kauj ruam 17:

Duab
Duab
Duab
Duab

Nyem rau GUI ntawv qhia zaub mov icon thiab xaiv reboot. Yog tias koj ua raws txhua cov kauj ruam no kom raug ces cov kwj dej yuav pib cia li nyob qhov twg los ntawm 30 vib nas this mus rau ib feeb tom qab nyem rov pib dua.

Kauj ruam 18:

Duab
Duab
Duab
Duab

Hloov tshiab: Kuv tsis tuaj yeem tau txais kuv cov kwj mus ua si ncaj qha hauv Google Chrome ntxiv lawm. Kuv xav tias nws tau tawg nrog Chrome hloov tshiab. Nws tseem ua haujlwm tau zoo ntawm Sonos thiab kuv lwm cov ntawv tshaj tawm.

Txhawm rau ntsuas tias cov kwj dej ua haujlwm raug, qhib lub vev xaib ntawm koj lub khoos phis tawj qub thiab mus rau "https://192.168.1.146:8000" (nrog koj tus Pi qhov chaw nyob IP raug hloov pauv rau kuv qhov tseeb) kom pom cov xwm txheej ntawm koj Pi's Icecast2 neeg rau zaub mov. Txhawm rau mloog, nyem rau ntawm M3U lub cim nyob rau sab xis saum toj lossis koj tuaj yeem nkag mus "https://192.168.1.146:8000/rapi.mp3" kom qhib kwj ncaj qha thiab hla rub tawm.m3u playlist file tag nrho. Yog tias koj hnov koj cov peev txheej nyob tam sim no Pi tau ua haujlwm raug thiab nws yog lub sijhawm ntxiv rau Sonos.

Kauj ruam 19:

Duab
Duab
Duab
Duab

Koj yuav tsum siv Sonos desktop tswj app los ntxiv cov kev cai ntws mus rau Sonos. Nyem rau Tswj> Ntxiv Chaw Nres Tsheb thiab nkag mus rau qhov url rau kwj uas hauv kuv qhov teeb meem yog "https://192.168.1.146:8000/rapi.mp3". Kuj nkag rau Lub Npe Chaw Nres Tsheb thiab nyem OK.

Kauj ruam 20:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Txhawm rau ua kom lub xov tooj cua raug cai peb tsuas yog ntxiv, xaiv "Xov Tooj Cua los ntawm Tunein" thiab tom qab ntawd "Kuv Lub Xov Tooj Cua" thiab tom qab ntawd koj yuav pom koj li Raspberry Pi teev. LUS QHIA ob-nias ua si lossis RIGHT-click los hloov lossis ntxiv chaw nres tsheb rau koj li Sonos nyiam.

Kauj ruam 21:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Tom qab ntxiv qhov chaw mloog xov tooj cua tshwj xeeb nws yuav muaj tam sim ntawd ntawm koj li Sonos mobile app. Sonos tsis ntev los no tau hloov kho lawv lub app rau lub siab dawb motif nrog rau hloov pauv "Sonos Favorites" mus rau "My Sonos" thiab siv cov duab me me loj dhau rau txhua yam. Muaj ntau qhov kev tawm tsam ntawm Sonos cov rooj sib tham raws li hom qub tau saib thiab ua haujlwm zoo nrog txhua yam yooj yim nkag tau yam tsis muaj qhov muag tsis pom koj hauv chav tsaus. Vam tias lawv yuav rov qab mus rau qhov qub qub sai. Xijpeem, ntawm daim ntawv thov tshiab, coj mus rhaub "Kuv Sonos" hauv qab, nqes mus rau "Chaw" thiab coj mus rhaub "Saib Txhua". Ntawm qhov screen tom ntej nqes mus txog thaum koj pom "Raspberry Pi". Coj mus rhaub rau nws thiab nws yuav pib ua si hauv koj chav xaiv (s).

Kauj ruam 22:

Duab
Duab
Duab
Duab
Duab
Duab

Qhov kawg uas yuav tsum tau ua yog teeb tsa Pi hauv rooj plaub. Kuv xaiv Flirc Raspberry Pi Case vim tias nws ob leeg zoo nkaus li thiab ua haujlwm tau zoo. Tag nrho cov ntaub ntawv txhuas ua raws li cua sov rau Pi tus txheej txheem. Yog tias koj tau txais cov ntaub ntawv no, tev tawm sab nplaum ntawm daim txhuam cua sov uas tau suav nrog thiab lo nws ntawm ib feem ntawm rooj plaub uas nce mus txog kom kov tus txheej txheem thiab tom qab ntawd tev tawm cov yas yas nyias ntawm lwm qhov, tsis nplaum sab (sab uas kov lub processor) ua ntej kaw rooj plaub.

Kauj ruam 23:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Tsuas yog tu tsev me ntsis: Yog tias koj npaj yuav tso koj tus Pi txuas ntawm ethernet ces koj yuav xav tua nws lub xov tooj cua Wi-nkaus kom txuag me ntsis kua txiv. Txhawm rau ua qhov no LEFT-nyem lub cim sib txuas network (lub cim me me thiab nqes xub) thiab xaiv "Tua Wi-Fi". Koj tseem tuaj yeem tua lub xov tooj cua bluetooth los ntawm LEFT-nyem lub cim bluetooth. Tsis tas li, Darkice program tau khiav nkaum hauv keeb kwm yav dhau yog li koj puas xav tau kom nws qhib lub qhov rai qhib, ntaus hauv "ps aux | grep darkice.cfg" thiab ntaus nkag thiab tom qab ntawd "sudo tua 976" (lossis txawm yog thawj zaug txheej txheem ID yog) thiab ntaus nkag. Txhawm rau rov pib dua cov kwj dej hauv "sudo darkice -c ~/darkice.cfg" thiab ntaus nkag lossis tsuas yog rov pib dua. Kuv tau xav paub ntau npaum li cas bandwidth Pi siv thaum tsis muaj cov neeg siv txuas nrog rau Icecast server yog li kuv tau teeb tsa lub cuab yeej saib xyuas bandwidth hu ua vnstat thiab cov lus teb yog 0 kbps. Yog tias tsis muaj cov neeg siv txuas nrog ces tsis muaj qhov siv bandwidth kiag li. Hmoov zoo thiab ua tsaug rau kev saib!

ps aw | siv grep

sudo tua 976

sudo darkice -c ~/darkice.cfg

Kauj Ruam 24:

Duab
Duab

Hloov kho Kaum Ib Hlis 2018: Kuv tau tsiv tawm ntawm lub xeev tsis ntev los no thiab xav txuas ntxiv mus mloog kuv pab pawg ncaws pob kev ua si tshaj tawm ntawm kuv tus neeg hais lus Sonos. Kuv tau sau tsab ntawv 17 xyoo dhau los uas nyeem tag nrho kuv pab pawg cov kis las txhua txhua tag kis seb puas muaj kev ua si hnub ntawd. Yog tias muaj nws xa email rau kuv, teeb kuv lub khoos phis tawj Hauppauge Colossus HDMI ntes daim npav los kaw qhov kev ua si los ntawm kab ntawv kab ntawv thiab Total Recorder kaw cov xov tooj cua tshaj tawm los ntawm xov tooj cua txuas nrog kuv lub khoos phis tawj kab-hauv. Txij li thaum kuv yuav tsis nyob hauv lub xeev lub xov tooj cua ua rau kuv tsis zoo tam sim no yog li kuv teeb tsa Raspberry Pi kom cia li tso qhov kev ua si tshaj tawm hauv kwj hauv lub vev xaib thaum nws raug khau raj. Yog li dab tsi tshwm sim tam sim no yog thaum pregame pib kuv lub khoos phis tawj hloov pauv Wemo txuas nrog Pi thiab nws khau raj thiab pib ua si xov tooj cua tshaj tawm thiab kuv sau los ntawm Pi lub mloog pob ntseg tawm siv kuv lub khoos phis tawj kab-hauv. Kuv tau muaj kuv lub khoos phis tawj tseem ceeb tshaj tawm lub vev xaib thiab kaw nws sab hauv tab sis kuv tsis nyiam kom kuv lub khoos phis tawj txuas tag nrho cov game. Kuv kuj xav kom tso lub suab rau kuv tus neeg hais lus Sonos thiab xav tias nws yuav yooj yim ua siv tsuas yog software tab sis nws hloov tawm uas tsis yog rooj plaub txij li Darkice tab tom nrhiav lub suab tso tawm, tsis yog tso tawm. Txoj hauv kev yooj yim tshaj plaws thiab ntseeg tau tshaj plaws yog txhawm rau txuas ib kawg ntawm 3.5mm rau 2x RCA adapter rau hauv Raspberry Pi lub mloog pob ntseg tawm thiab lwm qhov kawg rau hauv Behringer's RCA cov tswv yim thiab ua cov kauj ruam hauv cov lus qhia no kom ntws AUX cov tswv yim los ntawm Behringer. FYI, kom pib lub vev xaib ntawm khau raj koj yuav tsum hloov kho cov ntaub ntawv autostart hauv/etc/xdg/lxsession/LXDE-pi/autostart thiab ntxiv kab no thaum kawg:

Nws ua haujlwm zoo!

Kauj ruam 25:

Duab
Duab
Duab
Duab
Duab
Duab

Hloov kho Lub Rau Hli 4, 2019: Tshaj tawm lub suab nyob los ntawm kuv pab pawg ncaws pob TuneIn lub vev xaib rau Sonos tau ua haujlwm zoo tshwj tsis yog ob peb qhov kev tshaj tawm dhau los qhov ntim tau qis heev. Kuv tau rub qee cov vis dis aus YouTube thiab lawv nrov nrov thiab pom tseeb yog li ntim qhov chaw nyob nruab nrab ntawm chaw ntau pob thiab TuneIn cov servers yuav tsum tau qis dua. Tsis yog qhov teeb meem loj raws li kuv paub tseeb tias nws tau kho dua tab sis nws tau txais kuv los xav txog txoj hauv kev los txhawb qhov ntim ntawm Raspberry Pi lub suab tso tawm rau Behringer daim npav sab nrauv tsis siv lub mloog pob ntseg sib cais. Kuv xaj kom pheej yig $ 10 USB daim npav suab nrog lub zog muaj zog thiab tswj lub cev ntim tab sis yuav tsum tau hloov qee qhov kom tau txais Raspberry Pi kom lees paub nws ua daim npav suab pib. Cov ntawv qhia zaub mov icon ntawm lub desktop (Raspberry logo), tom qab ntawd nyem Khiav thiab nkag mus "sudo pcmanfm" los qhib Tus Thawj Tswj Ntaub Ntawv raws li tus neeg siv hauv paus. Tom qab ntawv mus rau /etc/modprobe.d/ thiab qhib "raspi-blacklist.conf" cov ntaub ntawv siv cov ntawv xov tooj thiab ntxiv kab "blacklist snd_bcm2835" (tsis muaj cov lus hais) thiab khaws tseg. Tom qab ntawv mus rau /lib/modprobe.d/ thiab qhib "aliases.conf" cov ntaub ntawv thiab tawm tswv yim tawm kab "xaiv snd-usb-audio index = -2" los ntawm kev ntxig hashtag nyob rau hauv pem hauv ntej ntawm nws kom nws nyeem zoo li: "#options snd-usb-audio index = -2" ces txuag. Rov pib dua thiab qhib lub davhlau ya nyob twg thiab ntaus hauv "arecord -l" txhawm rau sau cov khoom siv kom ntseeg tau tias Behringer daim npav suab tseem yog tib tus lej ntaus ntawv (tus lej tom qab lo lus "daim npav") uas tau teev tseg hauv koj daim ntawv darkice.cfg ntawm kab: ntaus ntawv = plughw: 1, 0 # Soundcard ntaus ntawv rau lub suab tawm qhov ntawd yog nws. Cov kev hloov pauv no yuav tso cai rau USB daim npav suab los ua lub suab tsis zoo rau txhua yam ntawm Raspberry Pi. Koj tuaj yeem-nyem rau ntawm tus hais lus lub cim ntawm lub desktop thiab xaiv daim npav USB suab twg yog lub neej ntawd.

Kauj ruam 26:

Duab
Duab
Duab
Duab
Duab
Duab

Hloov kho Lub Rau Hli 5, 2019: Thaum kuv xaj daim npav USB lub suab hais los saum no kuv tseem xaj kom pheej yig $ 15 USB daim npav ntes uas muaj lub tso suab tso saib seb nws puas tuaj yeem siv ob qho nrog Raspberry Pi ua lwm txoj hauv kev pheej yig dua rau daim npav Behringer thiab yog nws muaj software ntes tswj thiab cov lus teb rau ob leeg yog yog! Txhawm rau qhib kev tswj hwm txoj cai nyem rau ntawm tus hais lus icon thiab nyem "USB Device Settings …" tom qab ntawv nyem "Xaiv Tswj …" tom qab ntawd khij lub npov microphone thiab nyem "Kaw". Txawm hais tias nws tsuas muaj "Microphone" raws li qhov kev xaiv Kuv tuaj yeem lees paub tias nws yog qhov tseeb tso suab siv 3.5 mm lossis RCA cov tswv yim.

Raspberry Pi Contest 2017
Raspberry Pi Contest 2017
Raspberry Pi Contest 2017
Raspberry Pi Contest 2017

Khiav Tawm hauv Raspberry Pi Contest 2017

Pom zoo: