Stream album art from your Spotify account to a 32 by 32 WS2812B LED matrix via an Arduino UNO R4 WiFi board.
Album art by Tom Lehrer; public domain.
- Spotify Developer Account with Spotify Premium access
- Python 3.14+ for obtaining Spotify API refresh token.
- Arduino UNO R4 WiFi with USB cable.
- Four pieces of 32 by 8 (or 16 by 16) WS2812B addressable LED matrix panel. Total size of combined panels should be 32 by 32 pixels.
- LM2596S 12V to 5V step-down voltage regulator module with USB output (like this one but you can find it a lot cheaper on Chinese e-commerce sites).
- 12V DC power supply capable of providing at least 1.5A current.
- 2 wire splitters, one for 5V, and one for GND.
- At least 8 male-to-male jumper wires.
- At least 3 male-to-female jumper wires.
- Optional: 470 Ω resistor to prevent voltage spikes from damaging the LED matrix.
- Optional: Enclosure for the Arduino and LED matrix panel; IKEA SANNAHED 35x35 cm works well, the inner 24x24 cm mount opening can be enlarged with a pen knife to fit the LED matrix panel snugly.
Important
We are using 12V DC power supply and a step-down voltage regulator module, because powering this many addressable LEDs directly from the Arduino is prone to under-voltage issues, which can cause the LED matrix panels to display wrong colors.
-
Install Arduino IDE on your computer.
-
Clone this repository.
-
Copy
arduino_secrets_dev.htoarduino_secrets.hand update your WiFi credentials inarduino_secrets.h.cp --update=none ~/spotify-album-art-matrix/arduino_secrets_dev.h ~/spotify-album-art-matrix/arduino_secrets.h
-
Sign in to your Spotify Developer account (Spotify Premium is required).
-
Create a Spotify app.
-
Fill in the following details
- App name:
Album Art Matrix - App description:
Display Spotify album art on a WS2812B LED matrix. - Redirect URIs:
http://127.0.0.1:3000/callback - APIs used: Select
Web API.
- App name:
-
Agree with the Terms of Service and click "Save".
-
In the Spotify dashboard, select your newly created app and copy the
Client IDandClient secretto the spotify-album-art-matrix/arduino_secrets.h file under the fieldsCLIENT_IDandCLIENT_SECRET. -
Run the following script to obtain the
REFRESH_TOKENfor Spotify API access:python3 get_refresh_token.py
Copy the refresh token from the output to the spotify-album-art-matrix/arduino_secrets.h file under the field
REFRESH_TOKEN.
Important
The refresh token will expire after 6 months, upon which you will need to run the get_refresh_token.py script again and obtain a new refresh token.
-
From Arduino IDE, install
Arduino UNO R4 Boardsfrom Board Manager. -
Install the following libraries from Library Manager:
- ArduinoHttpClient by Arduino
- Adafruit GFX Library by Adafruit
- Adafruit NeoMatrix by Adafruit
- Adafruit NeoPixel by Adafruit
- base64 by Densaugeo
- TJpg_Decoder by Bodmer
-
Open and upload spotify-album-art-matrix.ino to your Arduino; ensure that the correct board (Arduino UNO R4 WiFi) and port are selected. Once uploaded, unplug the Arduino.
-
Daisy-chain the Data line of the 4 WS2812B LED matrix panels together (Data Out of the first panel to Data In of the second panel, and so on). Data Out of the last panel should not be connected to anything.
-
Depending on how you arrange the panels, and how your panels are manufactured, you may need to adjust the
Adafruit_NeoMatrix *matrix = new Adafruit_NeoMatrixvariable configuration in spotify-album-art-matrix.ino to ensure the pixels are mapped correctly.
Caution
Ensure that the power supply is unplugged when connecting the LED matrix panel to avoid any potential short circuits or damage to the components.
-
Designate 1 wire splitter for 5V, and 1 wire splitter for GND.
-
Connect the 5V terminal of all WS2812B LED matrix panels to the 5V wire splitter.
-
Connect the 5V output of the LM2596S step-down voltage regulator module to the 5V wire splitter
-
Connect the GND terminal of all WS2812B LED matrix panels to the GND wire splitter.
-
Connect the GND output of the LM2596S step-down voltage regulator module to the GND wire splitter.
-
Connect the main LED matrix panel Data In (
⚠️ not Data Out) to Arduino Digital Pin 6 (with optional 470 Ω resistor in series) -
Plug in the Arduino to the USB output of the LM2596S step-down voltage regulator module.
-
Plug in the DC 12V power supply to the LM2596S step-down voltage regulator module, and switch it on.
-
Now play a song on Spotify. You should see the album art of the currently playing track.
When no Spotify client is active or when playback is completely stopped, baby panda 🐼 will be shown instead.
- This is not an official Spotify product or service.

