OLED spectrum display on Volumio on Raspberry Pi Zero W

Could you post the link to the 1.3" OLED that you bought.

amazon.it/gp/product/B07D9G ā€¦ UTF8&psc=1

It should be supported with ā€˜mpd_oled -o3ā€™. If this isnā€™t working, what is the output of

sudo i2cdetect -y 1

IMG_5145.jpeg

sudo ./mpd_oled -o 3
this is the physical address that I put which is the same as the 0.96 inch one

Everything seems fine, so I went back and checked the product description at Amazon. If you read the reviews

amazon.it/gp/product/B07D9G ā€¦ merReviews

They say that the OLED controller is an SH1106, and not a SSD1306. In which case, try mpd_oled -o6 .

ok now it works thanks a lot

Hi all,
First of all I would like to thank @Adrii for his great job.

Iā€™ve followed the guide on github and installed evrithing smoothly.
Thereā€™s an issue on my system: The bars of the spectrum analyzer sometimes go full scale and under any circumstances It appears lagging and not matching the music playng at all.

Is this a problem vith my system?

Do you have a workaround? I tried all the drivers, 1,3, 6 i think (Iā€™m using a ss1306 display i2c connected).

Any help wuold be appreciated.

Another question: I use (on another sd card) pydpiper. Is it possible to have only the frequecy bars of your project instead of all the other information? I coul use, this way, 2 displays with 2 processes and different information displayed.

Thank you in advance

Hi Totonello

If you have recently installed mpd_oled, and it is just some ā€œrandomā€ bars suddenly displaying as maximum, then it is probably this issue (which includes a workaround)

github.com/antiprism/mpd_oled/issues/39

For a lagging display, try setting dtparam=i2c_arm_baudrate=800000

github.com/antiprism/mpd_oled/b ā€¦ MIO.md#i2c

Then start with ā€˜mpd_oled -b 10 -f 10ā€™, and try increasing -f to 20 (or 25), and then start increasing -b to, say, 21 (or more) to see what your setup will handle. (You should be using ā€˜mpd_oled -o3ā€™ as the driver for your display.)

If you just want the spectrum display on an OLED then the only way is to modify the mpd_oled code.

Adrian.

Thanks, Adrii

I will try and see if it goes properly.

EDIT: Fresh reinstall, baudrate 100000, goes great! Same for the stepback to the previous version.

For the modding of mpd_oled code I donā€™t think iā€™m skilled enough to doā€¦ but I can try.
Where is it located? can you give me little hints?

Thank you again

Hi Totonello

In github.com/antiprism/mpd_oled/b ā€¦ r/main.cpp, near the top of the file make this change

const int SPECT_WIDTH = 128;

Further down there is a function called draw_spect_display() that draws the screen when music is playing. Make it look like this

void draw_spect_display(ArduiPi_OLED &display, const display_info &disp_info) { draw_spectrum(display, 0, 0, SPECT_WIDTH, 64, disp_info.spect); }

And, if you donā€™t want the clock screen, make this change

void draw_clock(ArduiPi_OLED &display, const display_info &disp_info) { display.clearDisplay(); }

All untested!

Adrian.

Hi Adri,

I made the clock screen disappear, but i havenā€™t acheved it with the music info/spectrum page.

I followed your indications but, i think something more has to be deleted and/or changed.

I donā€™t want to make you in hurry, take your time :wink:

When/if you can you can update thi thread!

Thank you really much

Hi Totonello

I just tried the changes here and they worked for me. I have attached a copy of my modified main.cpp.
main.cpp.zip (6.21 KB)

Also, just to note, the cava repository has been updated with a fix for the maximum bars issue.

Adrian.

Thank you so much! I will try this this afternoon.
Do I have just to replace the file?

Further question will came really soon! :smiley:

Have a nice day

Yes, it is just main.cpp with the edits applied, so unzip and copy to overwrite the original main.cpp.

Adri, itā€™s quite sure, iā€™m dumb.

I did what you told me.

ssh to pi, mpd_oled folder, (mv main.cpp to backup, just in case) created a new main.cpp and pasted the code frome the file youā€™ve sent.

I have the clock when inactive and the regular screen when playingā€¦

Where am i wrong?

Thanks bro!

Did you stop the installed mpd_oled to test the new one?

sudo systemctl stop mpd_oled

Or, did you restart without installing the new one (sudo ./install.sh)?
Or, maybe the build didnā€™t complete and so you still have the old executable.
Maybe there is a timestamp issue and nothing was built, in which case you could try running ā€œmake cleanā€ and then rebuilding.

If you are unsureā€¦
Run: sudo systemctl stop mpd_oled
Make a fresh clone of the mpd_oled repository
Replace the main.cpp file
Then, continue as per the instructionsā€¦
Run: PLAYER=VOLUMIO make
Run a test mpd_oled command
etc

It works great!!!

Thank you so much!

The next step (Just waiting another oled display from china) is to use two displays:

one only for the music infos such as:

Title
Artist
Bitrate - frequency Filetype

Progress Bar

The other one For the frequency bars.

Do you think it is possble? I think Itā€™s just a matter of remodelling the main screen.

Iā€™ve used so far pydpiper. Do you think is it possible to run both the instancies togheter?

Youā€™ve been very kind and ready to answer. I really appreciate this!

It shouldnā€™t be a problem to run two OLED displays, but if they are running on the same i2c bus then the displays need different i2c addresses.

Hi Adrii,

It works really great!! :laughing: Thank you.

I am using Pi Zero WH + SSD1309 2.42" OLED.
the below is working for me and just for reference,

sudo ./mpd_oled -o 3 3c 10 -g 1 -f 20

If i want to show Asian characters such as Japanese, Korean, Chinese,
is it possible to change the font, and where is the path?

James

Hi James

Sorry, there is no option to allow display of non-latin alphabets. This is a long term issue: github.com/antiprism/mpd_oled/issues/9

I plan to fix this in the next iteration of mpd_oled, which I am currently working on, but there is no time frame for when this will be ready.

Adrian.