Install pygame
$ pip3 install pygame
- Config I2S (more info)
$curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash
- Setup powerup and powerdown button, pin 3(SCL) (more info)
Add in the file /boot/config.txt
: dtoverlay=gpio-shutdown
- If you want start the script in the init
Copy raspiphonoinit
to init directory
$ sudo cp RaspiPhono/raspiphonoinit /etc/init.d
Add execute permission
$ sudo chmod 755 /etc/init.d/raspiphonoinit
$ sudo update-rc.d raspiphonoinit defaults
Clone the code
$ git clone https://github.com/damiannogueiras/RaspiPhono.git
And run
$ cd RaspiPhono
$ python3 gramophono.py