Cov txheej txheem:

Raspberry Pi MP3 Player: 9 Kauj Ruam
Raspberry Pi MP3 Player: 9 Kauj Ruam

Video: Raspberry Pi MP3 Player: 9 Kauj Ruam

Video: Raspberry Pi MP3 Player: 9 Kauj Ruam
Video: Обзор работы RuneAudio на Raspberry Pi + Digi i2s как сетевого музыкального плейера. 2024, Kaum ib hlis
Anonim
Raspberry Pi MP3 Player
Raspberry Pi MP3 Player

Raspberry Pi yeej tsis zoo rau ua MP3 Player. Tab sis lub hom phiaj ntawm txoj haujlwm no yog kom paub siv GPIO Pins.

Lub hom phiaj dav dav nkag/tso tawm yog ib qho kev tso cai digital tus pin ntawm kev sib koom ua ke lossis hluav taws xob Circuit Court board uas nws tus cwj pwm-suav nrog seb nws ua raws li cov tswv yim lossis tso tawm-yog tswj tau los ntawm tus neeg siv thaum lub sijhawm khiav. GPIOs tsis muaj lub hom phiaj ua ntej thiab tsis siv los ntawm lub neej ntawd.- Wikipedia txiv leej tub

Lub Hom Phiaj: Siv GPIO thiab Ua rau koj Pi headless

Lub Hom Phiaj Cov Neeg Siv Khoom: Nruab Nrab - Paub tias yuav ua li cas thiaj nkag tau, nkag siab tias Pi ua haujlwm li cas, tuaj yeem khau raj lub operating system thiab paub txog kev thaiv kab.

Khoom siv

Nov yog yam peb xav tau:

  1. Raspberry Pi
  2. Cov pob x3
  3. Pendrive
  4. Peb tus phooj ywg duab los qhia:)
  5. Cov qhob cij
  6. Hlau

Cheebtsam ntxiv rau Raspberry Pi Zero

  1. HDMI (Nrog lub suab rau RPI Zero)
  2. HUB USB

Kauj ruam 1: Nyem SD Card

Nyem SD Card
Nyem SD Card

Rub tawm Etcher, thiab Raspbian Duab. Thiab tom qab ntawd nruab Etcher. Yog tias koj ua tiav, qhib nws thiab qhib Raspbian Duab ntawm Etcher. Ntxig koj daim npav SD thiab xaiv nws hauv Etcher. Nyem nyem. Tom qab ua flashing, Ntxig rau hauv koj li Raspberry Pi. Koj yuav xav tsis thoob, qhov tseeb vim li cas thiaj xav tau nyem?

Yog vim li cas:

Peb Pi yog khoob. Nws zoo li tib neeg lub cev tsis muaj lub cev ua haujlwm. Yog tias koj ntxig Organ (Flashed Memory card), lub cev (Pi) tuaj yeem ua haujlwm.

Kauj Ruam 2: Txuas Txhua Yam

Plug Txhua Yam
Plug Txhua Yam

Plug txhua yam. Dab tsi yog Hdmi (Nrog Suab rau Pi Xoom), Lub zog siv, Keyboard thiab Mouse.

Nco tseg rau Pi Zero User:

Yog, kuv nkag siab. Kuv kuj txom nyem thiab. Tias yog vim li cas kuv tsuas yog yuav Pi Zero. Tsuas yog yuav USB Hub thiab txuas nws los ntawm OTG.

Thaum Pi pib khau raj, ua tiav kev teeb tsa.

Kauj Ruam 3: Ntxig Nkauj thiab qhwv rau koj Pi

Ntxig Nkauj thiab qhwv rau koj tus Pi
Ntxig Nkauj thiab qhwv rau koj tus Pi
Ntxig Nkauj thiab qhwv rau koj tus Pi
Ntxig Nkauj thiab qhwv rau koj tus Pi
Ntxig Nkauj thiab qhwv rau koj tus Pi
Ntxig Nkauj thiab qhwv rau koj tus Pi

Ntxig txhua zaj nkauj (Mp3) rau koj Pendrive ua ntej. Thiab tom qab ntawd rub daim ntawv qhwv no thiab ntxig rau koj lub pendrive.

"Nov yog dab tsi? Tus kab mob?"

Qhov no hu ua wrapper. Koj tuaj yeem siv GPIO los tswj OMXPlayer los ntawm kev siv daim ntawv qhwv no.

Tsis tas li, credit rau Jehutting rau kev ua tsab ntawv no!: D

Thaum koj ua tiav, ntsaws lub pendrive rau Pi. Thiab txav zaj nkauj mus rau/home/pi/Music/

Txav cov ntawv qhwv mus rau/home/pi/Desktop

Tam sim no peb tsuas yog ntxig ib zaj nkauj thiab nws tus neeg ua haujlwm. Tam sim no cia ua rau lawv siv lub tshuab qhib thaum peb khau raj Pi.

Kauj Ruam 4: Ua Tus Pi Ua Zaj Nkauj ntawm Kev Pib

Ua kom Pi Ua Si Nkauj ntawm Startup
Ua kom Pi Ua Si Nkauj ntawm Startup
Ua kom Pi Ua Si Nkauj ntawm Startup
Ua kom Pi Ua Si Nkauj ntawm Startup
Ua kom Pi Ua Si Nkauj ntawm Startup
Ua kom Pi Ua Si Nkauj ntawm Startup

Txhawm rau ua qhov no, koj yuav tsum kho cov ntaub ntawv kom khiav cov neeg ua si.

Qhib Terminal

Hom

sudo nano /thiab /profile

Kev piav qhia: Sudo yog muab kev nkag tau ntawm koj cov lus txib. Thiab Nano zoo li cov ntawv sau. Qhov /etc /profile yog yam peb xav hloov. Nws zoo li qhib cov ntaub ntawv.txt hloov koj siv cov lus txib.

Thiab tom qab ntawd, Scroll rau hauv qab. Thiab ntxiv kab no:

sudo nab hab sej /home/pi/Desktop/omxplayer-player.py/home/pi/Music

"Qhov chaws no yog dab tsi?" Koj tuaj yeem nug, Tus lej no yog kom qhib lub qhwv thiab ua nkauj hauv qhov uas peb tau cawm lawv, "/home/pi/Music"

Tam sim no, nias "Ctrl + x" thiab tom qab ntawd nias Y, thiab Enter.

Tam sim no cia saib yog nws ua nkauj ntawm reboot. Hom:

Sudo reboot

Yog tias nws ua haujlwm, tom qab ntawd peb tuaj yeem txuas ntxiv mus rau cov khawv koob!

Kauj Ruam 5: Ua Khawv Koob Siv Gpio Pins

Ua Khawv koob Siv Gpio Pins
Ua Khawv koob Siv Gpio Pins
Ua Khawv koob Siv Gpio Pins
Ua Khawv koob Siv Gpio Pins

Tam sim no nws yog lub sijhawm rau koj pib siv GPIO Pins! Lawv zoo li zoo li Arduino tab sis nws txawv.

Tam sim no, kuv tab tom qhia qhov ua kom yuam kev. Txuas tus pin (Raws li kev siv), GPIO24 rau 3v3 thiab pom cov khawv koob.

"Wow! Zaj nkauj hloov pauv! Nws yog khawv koob, niam tau lub koob yees duab!"

Tau kawg txhua tus nyiam ua si nrog GPIO Pins:)

Tab sis qhov no tsuas yog pib, hauv MP3 Player ib txwm muaj, peb muaj 3 khawm. Tom ntej no, Ua Si/Ncua thiab Ua Ntej.

Cia siv Magic no thiab ua cov nyees khawm!

Kauj Ruam 6: Ntxiv Khawm

Ntxiv khawm
Ntxiv khawm

Yog! Peb tau txais kev kub ntxhov! Siv lub khob cij thiab txuas lawv raws li daim duab kuv tau ua.

Nco ntsoov tias Pi Zero muaj tib txoj haujlwm pin yog li tsis txhob txhawj txog nws.

Tom qab ua tiav, Sim booting li Pi thiab nyem cov nyees khawm. Tam sim no peb muaj 3 khawm. Yav dhau los, Ncua/Ua Si thiab Tom ntej.

Zoo, Cia tig nws mus rau hauv Cardboard ntxim hlub MP3 Player!

Kauj Ruam 7: Rhuav Cov Khawm

Solder Buttons
Solder Buttons

Peb yuav tsum tau muab tshuaj txhuam rau lawv kom lawv tau me dua thiab haum nrog lub thawv. Yog tias koj tsis paub nrog daim ntawv qhia zaub mov, nws zoo li sib txuas cov xov hlau tab sis muab lawv tso rau ntawm "khob cij" lub rooj tsavxwm. Peb xav tau ib qho me me.

Raws li daim ntawv qhia zaub mov ntawv peb tau ua, sim tshuaj xyuas "Nws ua haujlwm li cas?"

Lawv tuaj yeem txuas tau li cas txawm tias koj tsis txuas lub xaim? Sim txheeb xyuas txhua sab, saib nws ua haujlwm li cas. Yog tias koj tau txiav txim siab nws, koj tuaj yeem pib siv lub tshuab!

Kauj Ruam 8: Ntxig Lawv rau Hauv Lub Thawv

Muab lawv tso rau hauv ib lub thawv
Muab lawv tso rau hauv ib lub thawv
Muab lawv tso rau hauv ib lub thawv
Muab lawv tso rau hauv ib lub thawv
Muab lawv tso rau hauv ib lub thawv
Muab lawv tso rau hauv ib lub thawv

Txiav cov duab los qhia uas haum nrog koj tus pi thiab lwm yam khoom siv ntxiv. Thiab Ntxig rau lawv. Txog Khawm, peb yuav tsum txiav daim duab los ib yam li ntawm daim duab qhia saum toj no ib yam li ua qhov chaw rau usb cable thiab Earphone jack chaw nres nkoj kom lawv tuaj yeem tawm tau.

Thiab ntawm no peb mus!

Peb nyuam qhuav tsim lub MP3 Player txias

Vam tias koj txaus siab:)

Kauj ruam 9: Ua tiav

Tiav lawm!
Tiav lawm!
Tiav lawm!
Tiav lawm!
Tiav lawm!
Tiav lawm!

Koj tsuas yog ua MP3 Player! Thiab peb kuj tau kawm txog GPIO pins.

Kuv vam tias koj nyiam!

Pom zoo: