==== Audio Ausgabe aktivieren ====
Geht am Arduino vorbei, dieses Tutorial nutzen: http://www.lucadentella.it/en/2017/04/26/raspberry-pi-zero-audio-output-via-i2s/ und die asound.conf mit dem Kram von hier bestücken: https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/raspberry-pi-usage#detailed-install-5-16
<pre>sudo nano /boot/config.txt</pre>
<pre>
...
#dtparam=audio=on
dtoverlay=hifiberry-dac
dtoverlay=i2s-mmap
...
</pre>
<pre>sudo nano /etc/asound.conf</pre>
<pre>
pcm.speakerbonnet {
type hw card 0
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "speakerbonnet"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
channels 2
}
}
ctl.dmixer {
type hw card 0
}
pcm.softvol {
type softvol
slave.pcm "dmixer"
control.name "PCM"
control.card 0
}
ctl.softvol {
type hw card 0
}
pcm.!default {
type plug
slave.pcm "softvol"
}
</pre>
pygame installieren
<pre>sudo apt install python3-pygame</pre>
sound downloaden
<pre>wget http://www.wavsource.com/snds_2018-06-03_5106726768923853/animals/chicken.wav</pre>
python3 script erstellen
<pre>
import pygame
import time
pygame.mixer.init(44100, -16, 1, 1024)
pygame.mixer.music.load("chicken.wav")
pygame.mixer.music.play()
time.sleep(3)
</pre>
==== Kamera aktivieren ====