Umbau auf go
This commit is contained in:
parent
171f76ec26
commit
17e03820ec
39
README.md
39
README.md
|
@ -15,30 +15,29 @@ Remember to activate "ssh" before booting first (touch "/boot/ssh" on the MicroS
|
||||||
After login (ssh) proceed with these steps:
|
After login (ssh) proceed with these steps:
|
||||||
1. `sudo apt update`
|
1. `sudo apt update`
|
||||||
2. `sudo apt upgrade`
|
2. `sudo apt upgrade`
|
||||||
3. `sudo apt -y install git python3-pip libsdl2-mixer-2.0-0 usbmount screen`
|
3. `sudo apt -y install git python3-pip libsdl2-mixer-2.0-0 usbmount screen libasound2-dev`
|
||||||
4. `git clone https://repos.ctdo.de/interfisch/bananenkeyboard/`
|
4. `wget go1.19.2.linux-armv6l.tar.gz`
|
||||||
5. `pip3 install pyserial pygame`
|
5. `rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz`
|
||||||
6. `sudo sh -c 'echo "\n[all]\nenable_uart=1\n" >>/boot/config.txt'`
|
6. `git clone https://repos.ctdo.de/interfisch/bananenkeyboard/`
|
||||||
7. `sudo sh -c 'sed "s/^dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/" -i /boot/config.txt'`
|
7. `go get .`
|
||||||
8. `sudo mkdir /etc/systemd/system/systemd-udevd.service.d`
|
8. `go build .`
|
||||||
9. `sudo sh -c 'echo "[Service]\nPrivateMounts=no" >/etc/systemd/system/systemd-udevd.service.d/00-my-custom-mountflags.conf'`
|
9. `echo 'export PATH=$PATH:/usr/local/go/bin' >>~/.profile`
|
||||||
10. `chmod u+x ~/bananenkeyboard/Pi/s.py`
|
10. `sudo sh -c 'echo "\n[all]\nenable_uart=1\n" >>/boot/config.txt'`
|
||||||
11. `sudo sh -c 'cp /home/pi/bananenkeyboard/piconfig/rc.local /etc/rc.local'`
|
11. `sudo sh -c 'sed "s/^dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/" -i /boot/config.txt'`
|
||||||
12. `sudo chmod u+x /etc/rc.local`
|
12. `sudo mkdir /etc/systemd/system/systemd-udevd.service.d`
|
||||||
13. `chmod u+x ~/bananenkeyboard/piconfig/readonly.sh`
|
13. `sudo sh -c 'echo "[Service]\nPrivateMounts=no" >/etc/systemd/system/systemd-udevd.service.d/00-my-custom-mountflags.conf'`
|
||||||
14. `sudo gpasswd --add pi tty`
|
14. `sudo sh -c 'cp /home/pi/bananenkeyboard/piconfig/rc.local /etc/rc.local'`
|
||||||
15. `sudo /home/pi/bananenkeyboard/piconfig/readonly.sh`
|
15. `sudo chmod u+x /etc/rc.local`
|
||||||
16. `sudo reboot`
|
16. `chmod u+x ~/bananenkeyboard/piconfig/readonly.sh`
|
||||||
|
17. `sudo gpasswd --add pi tty`
|
||||||
|
18. `sudo /home/pi/bananenkeyboard/piconfig/readonly.sh`
|
||||||
|
19. `sudo reboot`
|
||||||
|
|
||||||
By copying the rc.local (step 11), the script will be started in a `screen` after reboot.
|
By copying the rc.local (step 14), the script will be started in a `screen` after reboot.
|
||||||
|
|
||||||
To start it manually type:
|
To start it manually type:
|
||||||
|
|
||||||
`cd ~/bananenkeyboard/Pi`
|
`./bananakeyboard_go`
|
||||||
|
|
||||||
`python3 ./s.py`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Convert and remove silence from samples:
|
# Convert and remove silence from samples:
|
||||||
`for file in *.mp3; do ffmpeg -i ${file} -af silenceremove=1:0:-30dB ${file/mp3/wav} -y; done`
|
`for file in *.mp3; do ffmpeg -i ${file} -af silenceremove=1:0:-30dB ${file/mp3/wav} -y; done`
|
||||||
|
|
Loading…
Reference in New Issue