A few of you might be familiar with the 'Car Thing' that Spotify released a couple years ago. For those who aren't, it's a small media device running spotify that you can clip in your car.
If you have an old toyota with no user interface or bluetooth for your music like me, this seems like a cool new gadget... if you have 80$ to spare.
God-complex activated! I figured I can create a less polished, bug-filled version of this with a few items I have laying around.
If you'd like to recreate this project, you will need the following:
- Raspberry Pi (any model will do, I'm using a RPi 2 model B)
- LCD touchscreen
- A way to connect your Pi board to Wifi
- Spotify Credentials
If you'd like to skip the hardware and just run the software, continue onto the installation section.
In order for this project to run, you will need spotify developer credentials from https://developer.spotify.com/.
Note: this option is only possible for premium Spotify users, sorry.
Create an .env
file to hold your spotify credentials. It should look something like this:
SPOTIFY_CLIENT_ID=<id>
SPOTIFY_CLIENT_SECRET=<secret>
In your newly created app settings, you will have to create redirect URIs with path /auth/callback
for authentication. If you are running this locally, add http://localhost:3000/auth/callback
, http://localhost:8080/auth/callback
if rendering server-side. For production, I don't know yet :) .
Now onto the fun stuff.
Install dependancies.
yarn install
Run the server and the react project with
yarn start