Cov txheej txheem:

Daim Duab Nrog Nrog Tus Hais Lus: 7 Kauj Ruam (nrog Duab)
Daim Duab Nrog Nrog Tus Hais Lus: 7 Kauj Ruam (nrog Duab)

Video: Daim Duab Nrog Nrog Tus Hais Lus: 7 Kauj Ruam (nrog Duab)

Video: Daim Duab Nrog Nrog Tus Hais Lus: 7 Kauj Ruam (nrog Duab)
Video: Tus Neeg Ruam - R-Lin Thoj | New Song [ Official MV ] Nkauj Tawm Tshiab 2023 Hmong Song 2023 2024, Hlis ntuj nqeg
Anonim
Image
Image
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in
Daim Duab Nrog Nrog Tus Neeg Hais Lus built-in

Nov yog txoj haujlwm zoo los ua tiav rau lub asthiv, yog tias koj xav ua koj tus kheej hais lus uas tuaj yeem tuav cov duab/daim npav lossis txawm tias koj yuav tsum ua. Raws li ib feem ntawm kev tsim peb yuav siv Raspberry Pi Zero W ua lub plawv ntawm txoj haujlwm, thiab I2S chav kawm D mono amplifier thiab 4 ohms hais lus, los ua si peb cov nkauj nyiam !! Thiab kuv kuj tau ntxiv ib daim kab xev LED hauv qab daim duab/daim npav daim npav kom koj tuaj yeem pom nws ci thaum hmo ntuj.

Hauv kuv qhov xwm txheej, kuv muaj nkauj mp3 uas kuv tau khaws ntau xyoo, uas kuv tau rub mus rau SD daim npav ntawm kuv tus Pi thiab khiav software uas hu ua Mopidy, uas yog cov nkauj txuas ntxiv tau sau hauv Python. Thiab koj tuaj yeem ua nkauj nkauj siv lub vev xaib ntawm koj lub xov tooj ntawm tes/ntsiav tshuaj/laptop raws li koj pom hauv video.

Thiab kuv tau ua ob hom lus ntawm tus hais lus, ib qho qauv yooj yim nrog lub hauv paus ntsuab thiab cov lus qhia qhia rau txhua tus neeg uas nyiam qhia ntawv.

Ib qho ntxiv, yog tias koj muaj koj cov nkauj sau online hauv Spotify, SoundCloud lossis Google Play Music koj teeb tsa lub mopidy txuas ntxiv los ua nkauj ntawm koj li kev sau ntxiv rau cov nkauj ntawm Pi.

Kauj Ruam 1: Tej Yam Koj Yuav Tsum Tau Ua Kom Tiav

Yam Koj Yuav Tsum Tau Ua Kom Tiav
Yam Koj Yuav Tsum Tau Ua Kom Tiav

Nov yog cov npe khoom siv hluav taws xob uas koj xav tau

  • Raspberry Pi Zero W.
  • APA102 LED sawb
  • Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A
  • Hais lus - 3 "Txoj kab uas hla - 4 Ohm 3 Watt
  • Poj Niam/Poj Niam Jumper Xov

Ib qho ntxiv, koj yuav xav tau 3D filament thiab lub tshuab luam ntawv 3D los luam tawm STL cov ntaub ntawv txuas hauv cov theem hauv qab no

Cov cuab yeej koj yuav xav tau

  • Kub nplaum nplaum thiab phom
  • 3D Tshuab Luam Ntawv
  • Xacto Riam
  • Soldering Iron thiab solder

Kauj Ruam 2: 3D Luam Ntawv STL Cov Ntaub Ntawv

3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv
3D Luam Ntawv STL Cov Ntaub Ntawv

Rub tawm STL cov ntaub ntawv txuas thiab siv 3D luam ntawv software hlais thiab 3D luam cov ntaub ntawv.

Hauv kuv qhov xwm txheej, kuv tau luam tawm STl cov ntaub ntawv siv Flashforge creator pro thiab 1.75 mm PLA los luam tawm. Ntxiv rau kev hlais kuv tab tom siv Slic3r nrog txheej txheej qhov siab tau teeb tsa 0.3mm thiab sau qhov ntom ntom mus rau 25 %.

Rau cov ntaub ntawv TopLEDstripPicture. STL koj yuav xav tau cov ntaub ntawv PLA translucent, yog li cov xim los ntawm cov hlua LED tuaj yeem nthuav tawm

Kauj Ruam 3: Txuas LED Sawb rau Pi Zero W

Txuas lub LED Sawb rau Pi Zero W
Txuas lub LED Sawb rau Pi Zero W
Txuas lub LED Sawb rau Pi Zero W
Txuas lub LED Sawb rau Pi Zero W

Solder 4 tus poj niam jumper xov mus rau LED sawb, thiab ntawm no yog kev sib txuas hauv Circuit rau APA102 LED sawb rau Raspberry Pi xoom W

  • Lub zog rau tus pin 2 ntawm Pi (5V Fais Fab)
  • GND txhawm rau pin 6 ntawm Pi GND
  • Cov ntaub ntawv rau tus pin 16
  • Clock rau tus pin 18

Thaum ua tiav, siv koj lub khoos phis tawj rub tawm qhov tseeb ntawm Rasbian-lite img ntawm daim npav SD (Rub tawm txuas rau cov ntaub ntawv img https://www.raspberrypi.org/downloads/raspbian/). Thiab tom qab ntawd ntxiv daim npav SD rau Raspberry Pi thiab txuas koj Pi rau koj lub WiFi router thiab sau ntawv tus IP chaw nyob, tom qab ntawd SSH rau hauv koj Pi

Pib los ntawm kev ua ob kab lus hauv qab no txhawm rau hloov kho thiab txhim kho pob khoom ntawm Pi.

sudo apt-tau hloov tshiab

sudo apt-tau hloov tshiab

Tam sim no, teeb tsa pob blinkt sau los ntawm cov neeg txaus ntawm Pimoroni. Thiab tom qab ntawd tau txais rainbow.py piv txwv los ntawm blinkt github repo siv wget.

sudo apt-tau nruab python-blinkt

sudo wget

Thiab tom qab ntawd khiav cov program nab hab sej nrog cov lus txib hauv qab no, thiab koj yuav tsum pom koj li LED sawb voj voog los ntawm cov xim raws li qhia hauv daim duab thib peb saum toj no.

sudo nab hab sej rainbow.py

Kauj Ruam 4: Txuas I2S Amp rau Pi Zero W

Txuas I2S Amp rau Pi Zero W
Txuas I2S Amp rau Pi Zero W
Txuas I2S Amp rau Pi Zero W
Txuas I2S Amp rau Pi Zero W
Txuas I2S Amp rau Pi Zero W
Txuas I2S Amp rau Pi Zero W

Solder lub header pins ntawm Raspberry Pi Zero W thiab tseem yuav txuas tus hais lus rau +ve thiab -ve ntawm Adafruit MAX98357 I2S Class -D amplifier.

Thiab ntawm no yog tus pin txuas ntawm Raspberry Pi Zero W thiab MAX98357 I2S Class-D amplifier.

  • Vin rau pin 4 ntawm Pi 5V
  • GND pin 9 Pi GND
  • DIN pin 40
  • BCLK to pin 12
  • LRCLK rau tus pin 35

Tam sim no teeb tsa thiab sim Adafruit's MAX98357 I2S Class-D Mono Amp, ua raws cov lus qhia ntawm Adafruit Learning system ntawm-https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/pinouts ? view = tag nrho. Yeej yog ib feem ntawm kev teeb tsa muaj kev teeb tsa yooj yim thiab teeb tsa nyuaj, yog tias koj npaj yuav khiav txoj kev yooj yim tsuas yog rub tawm thiab khiav cov kab ntawv hauv qab no

curl -sS https://raw.githubusercontent.com/adafruit/Raspbe… | tsoo

Txhawm rau txheeb xyuas yog tias lub plhaub tsab ntawv tau ua tiav, thiab koj tuaj yeem hnov lub suab los ntawm tus hais lus khiav

hais lus -xeem -c2 --test = wav -w /usr/share/sounds/alsa/Front_Center.wav

Thiab txhawm rau kho qhov ntim siv alsamixer hais kom ua, hauv kuv qhov xwm txheej kuv tau teeb tsa nws qhov ntim siab tshaj plaws.

Kauj Ruam 5: Teeb Mopidy los Ua Si Koj Lub Suab Nkauj

Teeb Mopidy Ua Si Qhov Koj Nyiam Tunes
Teeb Mopidy Ua Si Qhov Koj Nyiam Tunes

Tam sim no ua si koj cov nkauj nyiam peb yuav teeb tsa Mopidy thiab lub vev xaib rau mopidy, yog li koj tuaj yeem ua koj li nkauj ntawm koj lub xov tooj ntawm tes/rooj. Mopidy ua suab paj nruag los ntawm lub disk hauv zos, Spotify, SoundCloud, Google Play Music, thiab ntau dua. Koj hloov kho cov npe ntawm txhua lub xov tooj, ntsiav tshuaj, lossis khoos phis tawj siv ntau ntawm MPD thiab cov neeg siv khoom hauv web.

Tam sim no cia nruab Mopidy khiav cov lus txib hauv qab no

sudo apt-tau nruab mopidy

yog xav paub ntxiv tshawb xyuas cov ntaub ntawv ntawm - Kev teeb tsa - Mopidy 2.0.1 cov ntaub ntawv

Hloov kho mopidy.conf txhawm rau qhib ntu HTTP, MPD thiab Cov Ntaub Ntawv, ntawm no yog kuv mopidy.conf, thiab kuv cov npe hauv zos khaws cia musing yog/home/pi/Music, yog li yog tias koj npaj yuav siv.conf cov ntaub ntawv hauv qab no tsim "Nkauj" phau ntawv teev npe nyob hauv tsev

sudo nano /etc/mopidy/mopidy.conf

Kuv tau txuas kuv lub mopidy.conf, tsuas yog thaum koj xav luam nws. Yog tias koj npaj yuav siv lub vev xaib app hauv xov tooj/ntsiav tshuaj, koj yuav xav tau http tus thov kev pabcuam web, Kuv nyiam Mopidy-Mobile..

sudo pip nruab Mopidy-Mobile

Txhawm rau khiav mopidy ntawm khau raj khiav, thiab rov pib dua koj pi

sudo systemctl pab mopidy

sudo rov pib dua

Tsis tas li, yog tias koj npaj yuav thauj ntau cov ntaub ntawv mp3/.wav rau hauv Music nplaub tshev yav tom ntej, koj yuav tsum tau siv lub scan hais kom ua, kom cov nkauj tshwm hauv Mopidy-Mobile tus siv

sudo mopidyctl scan hauv zos

Thiab tom qab ntawd siv lub xov tooj ntawm tes qhib url hauv koj lub browser ntawm koj lub xov tooj ntawm tes/khoos phis tawj - https:// IpAddressOfPi: 6680/thiab ua si koj cov nkauj nyiam thiab nkauj, hauv kuv qhov xwm txheej kuv tau rub qee lub suab paj nruag tsim los ntawm youtube lub tsev qiv ntawv suab rau video demo, uas koj pom hauv lub screenshot saum toj no..

Kauj Ruam 6: Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Ntawv Qhov Chaw

Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw
Ntxiv Cov Khoom Siv Hluav Taws Xob rau 3D Luam Qhov Chaw

Txhawm rau ntxiv cov khoom siv rau 3D qhov chaw luam tawm, Pi Zero W yuav ua kom haum rau lub hauv paus thiab kuv tau siv ob tog ua npuas daim kab xev los tuav MAX98357 I2S Class-D amplifier rau lub hauv paus. koj tuaj yeem siv kua nplaum kub me ntsis kom ruaj ntseg rau lawv.

Tam sim no, rau Mopidy music player kom pib txhua lub sijhawm Pi tau hloov pauv, peb tuaj yeem teeb tsa Mopidy kom ua haujlwm raws li kev pabcuam, siv systemd koj tuaj yeem pab Mopidy kev pabcuam los ntawm kev khiav:

sudo systemctl pab mopidy

Qhov no yuav ua rau Mopidy cia li pib thaum lub kaw lus pib. Thiab Mopidy tau pib, nres, thiab rov pib dua ib yam li lwm qhov kev pabcuam systemd, siv

sudo systemctl pib mopidy

sudo systemctl nres mopidy sudo systemctl rov pib dua mopidy

Kauj Ruam 7: Qhia Tus Qauv ntawm Tus Hais Lus

Cov Lus Qhia Txog Tus Hais Lus
Cov Lus Qhia Txog Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus
Cov Lus Qhia ntawm Tus Hais Lus

Yog tias koj txaus siab los ua Cov Lus Qhia ntawm tus hais lus, 3D luam ob daim STL cov ntaub ntawv txuas hauv qab no es tsis siv tus hais lus daim phiaj STL cov ntaub ntawv txuas hauv cov kauj ruam dhau los. Luam tawm cov ntawv qhia ua LOG. STL daj, thiab hauv kuv qhov xwm txheej kuv tseem pleev xim nws nrog Uni Paint Pen (Fine Line PX-21), uas koj yuav tsum muaj peev xwm nrhiav tau ntawm koj lub khw muag khoom kho vajtse.

Ib qho ntxiv, yog tias koj muaj koj cov nkauj sau online hauv Spotify, SoundCloud lossis Google Play Music koj teeb tsa lub mopidy txuas ntxiv los ua nkauj ntawm koj li kev sau ntxiv rau cov nkauj ntawm Pi.

Pom zoo: