Cov txheej txheem:

PiPiano: 3 Kauj Ruam (nrog Duab)
PiPiano: 3 Kauj Ruam (nrog Duab)

Video: PiPiano: 3 Kauj Ruam (nrog Duab)

Video: PiPiano: 3 Kauj Ruam (nrog Duab)
Video: Yang Kao Moua FT Black Yang - Yug los xiam tiam (Official Music Video) 2024, Kaum ib hlis
Anonim
Image
Image

Synthesize koj tus kheej me me Raspberry Pi piano. Siv FluidSynth SoundFont synthesizer. Nta polyphony thiab txhawb nqa, lub ntsiab lus koj tuaj yeem thawb tag nrho cov ntawv sau ib zaug thiab daim ntawv yuav ua si ntev dua nrog khawm tuav cia.

Schematic thiab PCB tau sib koom ntawm EasyEDA. Cov qauv tsim thiab cov nab npawb nab npawb tau qhib tag nrho. Customize nws koj txoj kev!

Qhov haujlwm no thawj zaug pib ua lub suab fidget board rau kuv tus menyuam me, tab sis kuv ua si nrog nws ntau dua li nws tau ua. Tom qab ntau qhov kev hloov kho nws tau dhau los ua me me piano loj tuaj tuaj yeem txaus siab.

Kauj Ruam 1: Npaj rau Kev Tsim

Xav tau Raspberry PI xoom uas muaj internet txuas rau nruab pob. Xwb ib qho tuaj yeem siv kuv cov duab tsawg kawg uas ua lub piano raws li kuv tau tsim nws, kev sib txuas tau raug tshem tawm ib yam nkaus. Qhov loj me me Raspberry Pi tuaj yeem ua haujlwm ib yam nkaus, tab sis nws yuav tawm ntawm lub piano PCB.

Koj tuaj yeem siv JST lossis ntsia hlau txuas, nyob ntawm tus neeg hais lus koj siv. Kuv siv JST txuas nrog cov neeg hais lus kaw.

Koj tuaj yeem siv Raspbery Pi sib xws USB lub suab hais lus lossis adapter hloov pauv ntawm Maxim amplifier nti, uas yuav tsum tau muab tshuaj txhuam txhuam los txhuam nws hauv qab nti. Kuv sim nws nrog mini USB hais lus, tab sis nws suab ntau tinny dua li tus hais lus pom. Yog tias koj siv USB suab kho vajtse, yuav tsis muaj ib lub suab ntawm PCB yuav xav tau. Lawv nyob sab laug ntawm Raspberry Pi.

Kuv tau teeb tsa Raspberry Pi Zero hauv qab PCB, tab sis koj tuaj yeem tso rau saum. Tsuas yog xyuas kom SD daim npav zoo ib yam li tus pin 1 cim rau ntawm PCB thiab xyuas kom tseeb tias lub taub hau ntawm Pi Zero tau muab muag kom haum.

Txoj haujlwm no xav tau kev cai PCB los ntawm koj lub chaw tsim khoom PCB nyiam. Kuv tau txais 5 los ntawm JLCPCB rau 14 USD.

Gerber cov ntaub ntawv hauv Google Drive, koj tseem tuaj yeem tsim Gerber los ntawm EasyEDA.

Kuv kuj tau muab Daim Ntawv Teev Npe Cov Ntaub Ntawv.

Kauj ruam 2: Tsim

Kuv siv cov ntsuas kub tsis tshua muaj lead tsis pub muab tshuaj txhuam thiab cov cua kub rau qhov chaw tso cua sov ntawm Amp ICs. Kuv tsom mus rau qhov kub ntawm sab saum toj ntawm IC kom txog thaum kuv tuaj yeem pom cov hlaws dai txuas rau cov khoom sib txuas pom ntawm sab ntawm IC. Tus so ntawm cov khoom siv yog los ntawm lub qhov lossis loj SMD loj uas yooj yim tes soldered. Kuv tau siv kuv lub qhov cub toaster uas tau hloov pauv mus rau qhov rov kho dua, tab sis kuv tau ua tiav tes kho ntau ntawm nws.

Kauj ruam 3: Software

Npaj SD daim npav nrog Raspbian Lite

Teeb Pi txhawb rau Maxim IC

curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | tsoo

Nruab pob

sudo apt-tau hloov tshiab

sudo apt-tau hloov tshiab

sudo apt-tau nruab fluidsynth nab hab sej-nabpy nab nab-pip

sudo pip nruab pyfluidsynth

Hloov cov ntaub ntawv Project

Siv WinSCP lossis lwm yam SCP software los theej cov nab hab sej thiab cov ntawv font rau Pi lub tsev ntawv

chmod +x piano.py

sudo nano /etc/rc.local

Scroll cia, thiab ua ntej tawm kab 0 kab, sau cov hauv qab no:

nab hab sej /home/pi/piano.py &

Nyeem Xwb

Nws yog lub tswv yim zoo los ua cov ntaub ntawv kaw lus nkaus xwb, yog li nws tsuas tuaj yeem siv tau.

Qhov hloov pauv ntawm sab xis saum toj tso cai rau qhib nyeem nkaus xwb, txhawm rau tuaj yeem hloov kho qhov system.

wget

sudo bash nyeem -only-fs.sh

Yog nyeem/sau jumper GPIO = 3

Tsis yog rau GPIO-nres

Yog rau kernel panic

Xaiv qhov kev xaiv 1 rau Pi Zero W thiab Pi Zero 1.3 thiab xaiv 2 rau 1.2 Version (tsis yog W)

Rub tawm USBpiano.py thiab hloov pauv mus rau piano.py yog tias siv USB suab kho vajtse

Kuv ua daim npav daim duab rau lub piano, teeb tsa txoj kev kuv tsim nws. Txhua yam tsis tseem ceeb tau raug tshem tawm ntawm daim duab suav nrog kev sib tham. Siv tus password tsis raug: raspberry

Pom zoo: