Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #18

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,41 @@ Since we are using the lite version of raspbian, some extra packages need to be
1. Install updates

```
sudo apt-get update
sudo apt-get upgrade
sudo apt update
sudo apt upgrade
```
2. Install Required Packages.

Installation for python3-pip, raspotify, python3-tk, openbox
```
```sh

sudo apt install python-setuptools python3-setuptools

sudo apt install python3-pip

sudo curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

sudo apt-get install python3-tk
sudo apt install python3-tk

sudo apt-get install redis-server
sudo apt install redis-server

sudo apt-get install openbox
sudo apt install openbox

sudo apt install xorg

sudo apt-get install lightdm
sudo apt install lightdm

sudo apt install x11-xserver-utils

sudo apt-get install x11-xserver-utils
sudo apt install git

```

3. Install Dependencies

```
pip3 install -r requirements.txt
```sh
git clone https://github.com/dupontgu/retro-ipod-spotify-client.git
pip3 install -r retro-ipod-spotify-client/frontend/requirements.txt
```

4. Install pi-btaudio
Expand All @@ -60,18 +64,25 @@ sudo make install
6. Setup Spotify API

First Create an App at https://developer.spotify.com/dashboard/applications/

For more information on how to get a Spotify `CLIENT_ID`, `CLIENT_SECRET` and to set a `REDIRECT_URI`, you could visit the Spotify Docs section *Register Your App* [here](https://developer.spotify.com/documentation/general/guides/app-settings/).

```
https://accounts.spotify.com/authorize?client_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1&scope=user-read-playback-state%20user-modify-playback-state%20user-read-currently-playing%20 app-remote-control%20streaming%20playlist-modify-public%20playlist-modify-private%20playlist-read-private%20playlist-read-collaborative
https://accounts.spotify.com/authorize?client_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1&scope=user-read-playback-state%20user-modify-playback-state%20user-read-currently-playing%20app-remote-control%20streaming%20playlist-modify-public%20playlist-modify-private%20playlist-read-private%20playlist-read-collaborative
```


7. raspi-config

` sudo raspi-config`
Run
```
sudo raspi-config
```

and select following the options:

_Console Autologin_
_System Options -> Boot / Auto Login -> Console Autologin_

_Display Option -> Screen Blanking -> Off_ if you want to avoid the screen turning black after a few seconds.
_Display Option -> Screen Blanking -> No_ if you want to avoid the screen turning black after a few seconds.


8. bash_profile
Expand Down Expand Up @@ -117,11 +128,11 @@ exec openbox-session #-> This is the one that launches Openbox ;)
and add the following command to launch spotifypod.py:

```
cd /home/pi/fork/retro-ipod-spotify-client/frontend/
cd /home/pi/retro-ipod-spotify-client/frontend/

sudo -H -u pi python3 spotifypod.py &

sudo /home/pi/fork/retro-ipod-spotify-client/clickwheel/click &
sudo /home/pi/retro-ipod-spotify-client/clickwheel/click &
```

_Make sure that the paths are ok with your setup!!_
Expand Down Expand Up @@ -173,4 +184,4 @@ DEVICE_TYPE="smartphone"

Here is the wiring of the hardware, as of revision 1. Note that the pin numbers correlate to those referenced in [click.c](./clickwheel/click.c)

![Wiring Diagram](./.docs/sPot_schematic.png)
![Wiring Diagram](./.docs/sPot_schematic.png)