Browse Source

move setup instructions to readme

Thomas Buck 10 months ago
parent
commit
4717a903a3
3 changed files with 44 additions and 34 deletions
  1. 43
    4
      README.md
  2. 0
    29
      osci-pi.py
  3. 1
    1
      osci.service

+ 43
- 4
README.md View File

2
 
2
 
3
 Please see [my blog post for more details](https://www.xythobuz.de/osci_music_player.html).
3
 Please see [my blog post for more details](https://www.xythobuz.de/osci_music_player.html).
4
 
4
 
5
-Quick start instructions can be found in the top comment of the Python script in this repo.
5
+[Oscilloscope Music](https://oscilloscopemusic.com) Player for Raspberry Pi.
6
+Tested with a [Pi Zero 2 W](https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/), connected to a [HiFiBerry DAC+ Zero](https://www.hifiberry.com/shop/boards/hifiberry-dac-zero/), running [Raspberry Pi OS (Legacy, 32bit) Lite](https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz).
7
+Powered by [PiSugar 2](https://github.com/PiSugar/pisugar-power-manager-rs) and their [Python API](https://github.com/PiSugar/pisugar-server-py).
6
 
8
 
7
-    ssh osci-music "sudo systemctl disable --now osci.service" && scp osci-pi.py osci-music:~ && ssh osci-music "sudo systemctl enable --now osci.service"
8
-
9
-Also include a simple script to convert single SVG paths to audio.
9
+Also includes a simple script to convert single SVG paths to audio.
10
 Run the included makefile to convert the SVG files in this directory.
10
 Run the included makefile to convert the SVG files in this directory.
11
+
12
+## Quick Start
13
+
14
+Prepare a SD card with the Raspbian as linked above.
15
+Then run the following commands.
16
+
17
+    sudo sh -c 'echo "dtoverlay=hifiberry-dac" >> /boot/config.txt'
18
+    sudo apt-get update
19
+    sudo apt-get install python3 python3-pip python3-pil libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5 ffmpeg git vim
20
+    curl http://cdn.pisugar.com/release/pisugar-power-manager.sh | sudo bash
21
+    pip install pisugar
22
+    pip install luma.oled
23
+    pip install psutil
24
+    sudo usermod -a -G spi,gpio,i2c $USER
25
+    cd ~
26
+    git clone https://git.xythobuz.de/thomas/osci-music-player
27
+    sudo cp osci-music-player/osci.service /etc/systemd/system/osci.service
28
+    # edit username in /etc/systemd/system/osci.service as needed
29
+    sudo systemctl daemon-reload
30
+    sudo systemctl enable osci.service
31
+    sudo reboot
32
+
33
+To quickly test new changes to the script:
34
+
35
+    ssh osci-music "sudo systemctl disable --now osci.service" && scp osci-pi.py osci-music:~/osci-music-player && ssh osci-music "sudo systemctl enable --now osci.service"
36
+
37
+## License
38
+
39
+    This program is free software: you can redistribute it and/or modify
40
+    it under the terms of the GNU General Public License as published by
41
+    the Free Software Foundation, either version 3 of the License, or
42
+    (at your option) any later version.
43
+
44
+    This program is distributed in the hope that it will be useful,
45
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
46
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47
+    GNU General Public License for more details.
48
+
49
+    See <http://www.gnu.org/licenses/>.

+ 0
- 29
osci-pi.py View File

1
 #!/usr/bin/env python3
1
 #!/usr/bin/env python3
2
 
2
 
3
-# Oscilloscope Music Player for Raspberry Pi
4
-# https://oscilloscopemusic.com
5
-#
6
-# Tested with a Pi Zero 2 W:
7
-# https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
8
-#
9
-# Connected to a HiFiBerry DAC+ Zero:
10
-# https://www.hifiberry.com/shop/boards/hifiberry-dac-zero/
11
-#
12
-# Tested with Raspberry Pi OS (Legacy, 32bit) Lite:
13
-# https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz
14
-#
15
-# Add "dtoverlay=hifiberry-dac" to "/boot/config.txt"
16
-#
17
-# Install ffmpeg for the ffplay dependency
18
-#
19
-# Powered by PiSugar 2:
20
-# https://github.com/PiSugar/pisugar-power-manager-rs
21
-# https://github.com/PiSugar/pisugar-server-py
22
-#
23
-#     sudo sh -c 'echo "dtoverlay=hifiberry-dac" >> /boot/config.txt'
24
-#     sudo apt-get update
25
-#     sudo apt-get install python3 python3-pip python3-pil libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5 ffmpeg
26
-#     curl http://cdn.pisugar.com/release/pisugar-power-manager.sh | sudo bash
27
-#     pip install pisugar
28
-#     pip install luma.oled
29
-#     pip install psutil
30
-#     sudo usermod -a -G spi,gpio,i2c $USER
31
-#
32
 # IP address code taken from:
3
 # IP address code taken from:
33
 # https://github.com/rm-hull/luma.examples/blob/master/examples/sys_info_extended.py
4
 # https://github.com/rm-hull/luma.examples/blob/master/examples/sys_info_extended.py
34
 #
5
 #

+ 1
- 1
osci.service View File

5
 [Service]
5
 [Service]
6
 Type=idle
6
 Type=idle
7
 User=thomas
7
 User=thomas
8
-ExecStart=/home/thomas/osci-pi.py /home/thomas/music
8
+ExecStart=/home/thomas/osci-music-player/osci-pi.py /home/thomas/music
9
 Restart=always
9
 Restart=always
10
 RestartSec=5
10
 RestartSec=5
11
 
11
 

Loading…
Cancel
Save