Spotify Pixel Art Display

View on GitHub

My life revolves around music. I, like many others, correlate songs to pivotal moments in my life. And like many others, what I am listening to depends on the day's vibe. This project aims to dynamically incorporate music listening into home décor, instantly bringing personalization and variety into any space. Like a digital picture frame for your music, this 64x64 LED matrix displays a pixel art portrayal of the album cover for the song you're actively listening to on Spotify. When you're not listening to Spotify? The frame displays a mesmerizing, slowly fading rainbow gradient visualization of Conway's Game of Life to add ambiance to the room.

Flower Boy

Flower Boy

Conway's Game of Life

Conway's Game of Life

NOT ALL HEROES WEAR CAPES

NOT ALL HEROES
WEAR CAPES

Overview

The core of the project is a backend Python server that repeatedly calls the Spotify Web API to get the currently playing track or podcast episode for the user. The script runs on a Raspberry Pi Zero 2 W that I plan on turning into a sort of "home assistant" and the hub for various IoT projects. Once the server detects a change in album cover, it prepares the image to be displayed on the LED matrix. It then sends the data via an HTTP request to an ESP32-S3, which controls the matrix. This has been a passion project of mine that I first dreamt up when I began my first year as a Computer Science student. I also used it as an opportunity to learn the ESP32-HUB75-MatrixPanel-DMA library, more about the ESP-IDF framework, and embedded constraints like memory types and how to store large buffers.

Raspberry Pi Zero 2 W

Raspberry Pi Zero 2 W running the server

Game of Life demo

ESP HUB75 pinout

ESP HUB75 pinout

Complete matrix setup

Complete matrix setup

Power cables

Power cables

Back of matrix

Back of matrix

Front of matrix with acrylic diffuser

Front of matrix with
acrylic diffuser

Technical Highlights

  • The microcontroller utilizes a DMA (Direct Memory Access) double buffer for rapid and smooth drawing of images. While one image is being displayed with data in the front buffer, data can be loaded into the back buffer. Once the back buffer image is ready, the buffers are swapped for immediate frame transition. Otherwise, the user would see images being drawn line by line.
  • Both the server and firmware code are highly customizable, allowing for easy handling of various LED panel dimensions, pin mappings, etc. On the firmware side, there is a custom ESP-IDF "menuconfig" menu for no-code setup.
  • The firmware relies on numerous dependencies in the form of git submodules. Several conflicts arise that can be resolved through ESP-IDF's CMakeLists.txt files. To simplify development, I've added custom scripts to apply patches to each submodule and resolve conflicts.
  • Attached to the panel is a translucent piece of black acrylic, which acts as a slight diffuser screen, increases contrast, and hides unlit pixels.

Future Features

I plan to continue this project for some time as I make it the ultimate décor piece. For one, I intend to learn CNC woodworking in order to make a polished, proper enclosure. I also have plans for a new screensaver—think digital clock meets Subway Surfers.