[PLUGIN] MPD OLED - installation & configuration plugin

Hi Matteo

There have been recent changes to cava and it no longer bundles the libiniparser library. I have updated all the instructions for building from source to install the system provided version

sudo apt install libiniparser-dev

This may be enough to build cava on Volumio3, however, I think that Volumio2 includes an older version of the libiniparser library and cava cannot find the components of it directly, and so some extra flags (CPPFLAGS or LDFLAGS) may need to be set when running configure. If you cannot get configure to complete after installing the libiniparser-dev package, let me know what version of Volumio you are using and I will take a look at what the exact configure command should be.

Adrian.

thanks Adrian. I’m running volumio 2 version. Infact command “sudo apt install libiniparser-dev” get me “E: Unable to locate package libiniparser-dev”

thanks. I’ve installed cava. Antiprism version has not the brightness control. Instead of “git clone https://github.com/antiprism/mpd_oled” i used “git clone https://github.com/supercrab/mpd_oled”. Now i’ve folder mpd_oled in volumio and i’m able to launch mpd_oled if i digit
“sudo mpd_oled -o 1 -b 15 -g 1 -f 15 -r 25 -D 24”
when i digit
“sudo mpd_oled -o 1 -b 15 -g 1 -f 15 -r 25 -D 24 -t 255” i get

mpd_oled: error: -t: unknown option

You should be able to build my fork and get the extra parameters?

Hi Matteo

I found an old cava issue relating to this last time libiniparser was unbundled, and it seems that Volumio2 does not have this package

https://github.com/karlstav/cava/issues/231

Given that Volumio2 is discontinued, the easiest option will be for me to add instructions to build the last version of cava before libiniparser was unbundled.

Also, despite what I said in the linked issue, setting flags was no longer needed for Moode on Buster when I tried the other day, suggesting that the cava build configuration now handles the Buster libiniparser-dev package. I’ll also check on Volumio3 though.

Adrian.

Sorry. I was wrong. when i run
volumio@volumio:~/cava$ make
i get fatal error: iniparser.h: No such file or directory

I’ve not unistall old mpd_oled so the command sudo mpd_oled launch the installed version. So is correct to have the -t error
No i’ve the folder mpd_oled created with “https://github.com/supercrab/mpd_oled”
if i launch command “sudo ./mpd_oled -o 1 -b 15 -g 1 -f 15 -r 25 -D 24 -t 255” i get
sh: 1: cava: not found

So i’ve to resolve cava problem first.

Hi Matteo

I have tested on Volumio2, and you can build the last version of cava before libiniparser was unbundled with the following commands (make sure you don’t already have a cava subdirectory)

git clone https://github.com/karlstav/cava
cd cava
git checkout -b cava_with_iniparser 03a8c85c
./autogen.sh
./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpd_oled_
make
sudo make install-strip

Adrian.

Hi Adrian!, thank you so much for interesting. I’ve run the lines. It seems that cava is not installed again. If i run cava -h volumio return “command not found”

Hi Matteo

The build instructions produce a feature-reduced cava binary called mpd_oled_cava, which mpd_oled will use by default. Test with

mpd_oled_cava -h

Adrian.

thanks! mpd_oled_cava -h returns istructions.
Now If i run sudo ./mpd_oled -o 1 -b 15 -g 1 -f 15 -r 25 -D 24 -t 255.
i get
sh: 1: cava: not found

Hi Matteo

Ok, I had a look at the supercrab version of mpd_oled, and it is based on an older version of mpd_oled and needs a cava binary called cava. In which case, you could just copy the newly built mpd_oled_cava binary to this name

sudo cp /usr/local/bin/mpd_oled_cava /usr/local/bin/cava

Test

cava -h

Adrian.

1 Like

thank you so much. It works! Even if there is very little difference beetween contrast -t 0 and -t 255.

Thanks for you help solving this - I wouldn’t have a clue!

When’s MPD_OLED_U8G2 coming? :rofl::rofl::rofl:

Glad you managed to get it working!

Here are all the options you can try for brightness, I think some might work better in combination:

-t <num>   Screen contrast (0 - 255)
-e <num>   Precharge period (0 - 34)
-v <num>   Vcom deselected level (0 - 7)

Would you please telll me what is the lifespan of an oled display. I keep mine around 80% on.
Thbaks

Hi Florin

Here is what a display looks like after running mpd_oled 24 hours a day for four years

The darker pixels are almost unreadably dark, and the brightest pixels are probably dim compared to a new display! I guess the display was looking pretty bad at two years.

Adrian.

These displays are not designed to be always on. I think one year of constant use will ruin it. :disappointed_relieved: That’s why these displays are so cheap. VFDs are better for long term use.

If only one would write a Volumio 3 plugin for use with VFDs/LCDs, that would be amazing.

1 Like

but 2,50 euro per year for a new display… Is not a mayor cost

In theory mpd_oled could be altered to work on 128*64 pixel screens and @Adrii was looking at using the U8G2 library to support many more displays. The thing is mpd_oled is perfect just the way it is and you can’t really improve it, especially given the price of these small OLEDs and how easy they are to attach to a pi. Support for VFDs this is a bit more tricky since you’d need some extra components and there’s no pixels only alphanumerics :\