Coder Social home page Coder Social logo

phkehl / albumartdisplay Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 0.0 3.52 MB

Album (cover) art display for LMS using ESP32 and Arduino

License: GNU General Public License v3.0

C++ 18.43% Makefile 0.63% C 74.05% Shell 0.08% Perl 6.81%
arduino esp32 hub75 hub75e lms squeezebox squeezebox-server nyancat

albumartdisplay's Introduction

Album Art Display

by Philippe Kehl , https://oinkzwurgl.org/projaeggd/album-art-display

Album Art Display Album Art Display

Introduction

This displays the cover art of the currently playing music on a 64x64 pixel LED display ("HUB75E" type display). It uses an ESP32 to get the cover art directly from the Logitech Media Server (LMS) (a.k.a. Slimserver, Squeezebox server) and show it on the display. It connects to the LMS command line interface (CLI) and subscribes for changes. When the state (play, pause, stop) or song changes it updates the display accordingly.

It uses the LMS CLI to find all players. It uses the first one currently playing.

When no player is playing random animations play instead of displaying the a cover art. Some animations are built-in and others are GIF files (see data folder, see Credits below).

Inspired by https://github.com/fspoettel/thirtytwopixels

Building

Note: This is for Linux. Building this on other systems should work, but is your own problem... :-)

You will need the right Arduino board installed: Arduino core for ESP32.

Preparation

Create a file src/secrets.h file based on src/secrets-example.h and set the SSID and password for at least one network. Configure the server and port for the LMS.

Makefile (recommended)

Build, flash and watch serial monitor:

$  make esp32-mini32-upload flash-spiffs monitor

Say make help for more information

The build configurations are defined in the Makefile, src/config-common.txt and src/config-esp32-mini32.txt. Additional build configurations can be defined.

Arduino IDE

(Untested. YMMV.)

You'll have to run the following script before building (verifying or uploading the sketch):

$ ./tools/gen_config_h.pl <name>

Where <name> is the target name. For each target a file src/config-<name>.txt must exist.

The arduino-esp32fs-plugin should work to create and flash the SPIFFS image (untested).

Debugging

The software produces text debug output on the serial port at baudrate 115200. Use the serial monitor in the Arduino IDE or the provided tools/debug.pl script to display it on the screen. The debug.pl script will also colourise the output.

Hardware setup

The board is a "Wemos mini32 v1.0.0" (from https://www.bastelgarage.ch/esp32minikit-wemos), which seems similar or identical to the "MH-ET LIVE MiniKit" (https://riot-os.org/api/group__boards__esp32__mh-et-live-minikit.html).

The HUB75 (HUB75E) pinout is as follows (male input socket on the back of the display):

                 ______
                /     /|
               +-----+ |
            R1 | o o | |G1
            B1 | o o | |(GND)
            R2 |/o o | |G2
            B2   o o | |(GND) E on HUB75E
             A  /o o | |B
             C | o o | |D
           CLK | o o | |LAT(CH) (STB)
    (BLANK) OE | o o |/ GND
               +-----+

Note that sometimes R1/G1/B1/R2/B2/G2 are labelled R0/G0/B0/R1/B1/G1 and sometimes the R/G/B lines are swapped.

The configuration for the LED display connection is set in the src/config-<name>.txt file.

Credits, 3rd-party code

Use customised ESP32 SDK

Update the board support to the latest release: Got to espressif/arduino-esp32/releases and find the link to the latest (e.g. https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc4/package_esp32_dev_index.json). Add that link to Arduino config and update the board support in the boards manager.

Get this: https://github.com/espressif/esp32-arduino-lib-builder and do this:

$ IDF_PATH=/home/flip/sandbox/esp32-arduino-lib-builder/esp-idf make menuconfig
# Enable CONFIG_FREERTOS_USE_TRACE_FACILITY, CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID and
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS to enable tasks list debugging.
$ ./build.sh
$ ESP32_ARDUINO=/home/flip/.arduino15/packages/esp32/hardware/esp32/1.0.5-rc4 ./tools/copy-to-arduino.sh
$ ln -s . ~/.arduino15/packages/esp32/hardware/esp32/1.0.5-rc4/tools/esptool

albumartdisplay's People

Contributors

phkehl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.