OLED spectrum display on Volumio on Raspberry Pi Zero W

Hi Adrian,

I stopped the service and tried to update.

At “make” i get the following error:

g++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DVOLUMIO -c -o main.o main.cpp main.cpp:28:25: fatal error: programopts.h: No such file or directory #include "programopts.h" ^ compilation terminated. <builtin>: recipe for target 'main.o' failed make: *** [main.o] Error 1

and yes i don’t find this missing file.

Do i have to start from scratch ? Update cava first, also ?

Josef

Hi Josef

You can update your local copy of the repository by changing to the top directory and running

git pull

If there are errors (due to local changes), just start again with a fresh directory by running

git clone https://github.com/antiprism/mpd_oled cd mpd_oled

When you have the latest code, you can skip to “Now build mpd_oled” in the install instructions.

The scroll option default is equivalent to ‘-s 8.0,5.0’, which is an initial pause of 5 seconds and then scrolling at 8 pixels per second. I haven’t added anything to the installation documentation yet, but you can see all the options by running mpd_oled -h .

Adrian.

Hi Josef

Sorry, there were some files missing from the repository, and this was why you you had the message about the missing file. I have now added in these files, and if you try updating the repository again the build will now hopefully complete correctly.

Adrian.

Hi Adrian,

Thank you very much - now the “make” is working. Wonderful. :smiley:

For me it is working best with the following settings:

sudo ./mpd_oled -o 6 -a 3c -b 21 -g 1 -f 20 -s 9.0,6.0
I’m really very happy with this.

If you have a little time more in future I do have another improvement idea which is to make line 1 and line 2 scrollable independently.
This would be helpful because my favourite radio station “Swissgroove” has a very long description within the Sender name.
“SwissGroove - The world’s #1 for jazz, funk, soul, world, latin, lounge & nu grooves”
I would like to only see the beginning “Swissgroove - The bla bla” and then cut of because this is informative enough, i think.
Maybe this could be set automatically only for webradio stations - which is e.g. possible in the Nanosound plugin (with a little help from the nanosound devs).


I changed the I2C address of a second display now by resoldering the position of the 0 Ohm “resistor” on the backside of the display and will try to work around by connecting 2 displays and run a second instance of mpd_oled (renaming the service name to mpd_oled2.service) and do not let it scroll.
But it will look a bit silly i fear - a great thing would be to have the bar graphs separated for left and right channel and displaying the play time instead of the time to give this more sense.
If you think this is interesting i could send you an OLED with a modified I2C address, also to say a little thank you.

What do you think ?

Again, thank you for that great job.

Josef

Just in case this should be the kind of music you also listen to: (it’s ad free):
http://www.swissgroove.ch
Streaming URL to add it to Volumio:
http://stream1.impek.com:8100/

Hi Josef

Thank you for your offer of an OLED. I don’t have any plans at the moment to support a second screen, but I recently ordered a second OLED and so if I do ever need to test with a second screen I will be able modify and use that.

I have added in independent scrolling values for the text fields, see ‘mpd_oled -h’. You can turn off scrolling for a field by setting a scroll rate of 0.

I listen to a variety of music, so I will check out Swiss Groove.

Adrian.

P.S. I noticed a 2.4" 320x240 TFT SPI screen on eBay yesterday for 5 Euros, which seems impossibly cheap

ebay.es/itm/240x320-2-4-SPI … 3039325767

I have ordered one of these, as it seems to work well with the Pi Zero (someone is reporting 40 FPS).

Hi Adrian,

Many thanks - now i’m a happy man. :smiley:

Regarding the second display - i would need this to use the whole display window of the “revamped” tuners that i use for most of my Volumio projects, that will hopefully go final one day. So - a bigger display doesn’t help me - but more of the OLED’s side by side would do.
I understand this is not on your list as you are building a tiny PI-Zero project…


I wonder why there appearently are not many more Volumio users that like to have a display like this, which is cheap and - thanks to your very good instructions on github - easy to install.

I wish you all the best.

Josef

Hello Adrian, excellent work and documentation, I was able to install and config it successfully with my setup (raspi Zero W and Hifiberry Dac+ standard). Did wonder if there is an easy way to switch between 12 and 24hr format for the time displays?

Hi

Sorry for not replying sooner (I didn’t receive an email notification that there was a post in the thread).

The clock is currently 24h only, but I can add in a 12h option. To save space I will just add in a dot at the top right of the time to indicate pm.

Adrian.

Hello.
Really nice work!

Few questions:

  1. Cava is need here only for visual analyzer part?
    Not that i’m not like visual analyzers, but to download lots of libs and other packages only to compile cava is kinda like overkill. I will check if it possible to compile cava and mpd_oled once and then transfer only compiled binaries to working device. Hope it will work.

  2. How about Japanese/Korean/Chinese/etc. characters displaying?
    Right now screen (SSD1306 I2C 128x64) show some weird stuff instead of 'em for me. But may be it just me did something wrong in process of compiling.

Hi Koyote

  1. Yes, Cava is only needed for the spectrum analyser. In the future the spectrum analyser will be optional.

  2. There is currently no support for non-Latin scripts, but an issue has been opened: github.com/antiprism/mpd_oled/issues/9

Adrian.

Oh, i understand now. :blush:
Characters will need more space in pixels (both height and width) (especially on monochrome displays).
Ok, will wait for customize layout option then =)

Hi,

I would like to test the mpd oled, but I am not able to get i2cdetect -y 1 working. I get an error:

-bash: i2cdetect command not found.

I tried it with fresh installed volumio 2.513 version.

Any tips?

Thanks in advance
Kay

This seems to be the most active place to ask about the problem I’m having. I’m new to this. :slight_smile:

I’ve run through the Github install instructions and everything appears to have installed correctly. I’m using the SH1106 I2C OLED from Ebay. It defaults to the full screen clock when not in use and auto-starts as well. When I start the music (Volumio) it switches shows the artist, track name, clock BUT DOES NOT show the spectrum analyzer. There’s a solid line across the bottom but nothing else. It is refreshing since when I change tracks it updates immediately.

  1. I’ve gone back and re-installed everything for CAVA successfully and nothing seems to make a difference.
  2. run top and see whether mpd_oled and cava are running - I can see them both running.
  3. run ls /tmp and see if you can see the FIFOs mpd_oled_fifo and cava_fifo - I can see both files (mpd_oled_fifo, cava_fifo_579)

What am I missing? where should I be looking to determine what’s failing?

Any suggestion would be appreciated.

Had this happen to me once, check your changes are indeed in your mpd.conf template file as per:

sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
And add the following lines at the end

audio_output {
type “fifo”
name “mpd_oled_FIFO”
path “/tmp/mpd_oled_fifo”
format “44100:16:2”
#buffer_time “500000”
}

Hi, I’m not sure if this thread is still active, but I’m struggling to get anything showing on my display.

I’ve followed the instructions on git hub through several times, all with no luck.

github.com/antiprism/mpd_oled/b … VOLUMIO.md

I don’t see any errors in any of the steps, and I believe I’ve always had the screens wired in correctly (according to the instructions at least).

So far I’ve tried

I’ve tried three different screens (two cheap from china, and one from amazon uk), and all had the same results. All SH1106 I2C 128x64 I believe.
Two different raspberry pi zero ws.
Clean installation of the latest volumio.

The command I’m using is: sudo ./mpd_oled -o 6 -b 10 -g 1 -f 20 -a 3c

I’ve never had anything displayed on any of the OLEDs and I’m a bit baffled. :frowning: Any ideas where I might start to diagnose what I’ve done wrong?

Many thanks in advance.

The wiring I’m using is attached:

IMG_20190205_091817.jpg

Try working through the guide here to make sure the oled can be seen on the i2c bus:
raspberrypi-spy.co.uk/2018/ … pberry-pi/

Hi

I missed that there were posts here as I didn’t receive any notifications. If there are any outstanding questions then please let me know.

Similarly, if I seem to be ignoring a message then I probably haven’t received a notification, in which case please let me know at adrian@antiprism.com

Adrian.

Hi, I have installed, the following build,
github.com/antiprism/mpd_oled/b … VOLUMIO.md,
the display turns on, marking time and IP address, but when the song starts, it does not show the name and the graphic equalizer is missing, how could I solve it, thanks

Hi ghera78

For the song name:
Go to Browse > Web Radio > Volumio Selection and click on Absolut Radio (the first station). When Absolute Radio is playing, what do you see in the bottom half of the OLED display?
If you see “Absolut Radio” on one line, and underneath it the name of the song that is playing, then mpd_oled is working correctly.

For the spectrum analyser:
Run the following command

tail /etc/mpd.conf

If you don’t see something like

audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
}

Then review this section of the installation instructions: github.com/antiprism/mpd_oled/b … y-of-audio
Especially the part that says: “After editing the file it is important to force Volumio to regenerate mpd.conf and restart MPD. Do this by going to the Web UI PLAYBACK OPTIONS and clicking on the Audio Outputs save button.”

Adrian.

I tried to make those changes but the result does not change it remains only the time IP address and date, I realized that at the beginning of the code it does not pull down the libraries for the raspi-config anyway I did it after the fact is that it makes mistakes in the installation I don’t know if they are influential and depend on the fact that at the beginning it does not download the library correctly, however tomorrow I try to redo the procedure by recalling the raspi-config libraries at the beginning and not only when you realize that they are not there, having said that if you have any suggestions or other guides I would be grateful to you having said that I wish you a good Sunday