Ziel:
An der alten Sony Stereoanlage sollten mp3's direkt abgespielt werden können.
Die Sony Anlage hat zwei ChinchEingänge (weiss+rot).
Optimalerweise kann man die Musik a) am Pi umstellen b) vom PC direkt aufspielen c) den PI mit einem Android Tablet / Handy fernsteuern
Teile:
1x Raspberry Pi B
1x Netzteil
1x Stromversorgung für Pi
1x Netzwerkkabel
1x USB Soundkarte ( C-Media Plantronics )
1x 32GB USB Stick
1x Gehäuse (klar) für PI
1x SD Card 16GB ( hätte kleiner sein dürfen) raspbian
Kleinteile für 5 Schalter:
1x kl. Lochrasterplatine
5x 10KOhm Widerstand
5 x Microtaster
7 x Kabel mit Femalestecker zum aufstecken auf den PI
ein paar Strippen
Optional 2 LEDs:
2 LED
2 680Ohm Widerstand
Werkzeug: Lötkolben, Heißklebebpistole, Multimeter, diverse Zangen, Cutter
Software:
Pi: mpd, mpc, samba, apache2
webclient:phpmpreloaded
Android Client: Droid MPD Client
PC: GmpcPortable
Aufgeklappt: http://imgur.com/kkJTAhP
Zusammengebaut: http://imgur.com/Xab1yDy
PinBelegung:
Pin 1 3.3v
Pin 6 Ground
Taster in:
Pin 7 Braun
Pin 11 Rot
Pin 15 Orange
Pin 19 Gelb
Pin 21 Grün
LED Out: ( nicht verbaut, nur beim testen angeschlossen)
Pin 8 LED 1
Pin 16 LED 2
Python Source: http://pastebin.com/NiSx40vy
python Script wird per crontab eintrag automatisch beim starten hoch gefahren:
USB Stick wird beim starten des PI automatisch gemountet ( mein Stick hat ntfs, damit schreiben dort klappt, habe ich ntfs-3g installiert) :
samba3 stellt das Verzeichnis /daten/music als Freigabe zur Verfügung ( ja, ohne Passwort)
[global]
workgroup = WORKGROUP
server string = %h Piserver
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 100
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[stick]
comment = stick
browseable = yes
path = /daten/music
printable = no
guest ok = yes
read only = no
create mask = 0777
Alles anzeigen
Freigabe auf dem PC verbunden als \\192.168.0.99\daten
Fertig