Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
#1
The mpd_oled program displays song status and an audio spectrum analyser on an I2C 128x64 OLED display connected to a Raspberry Pi (or similar) running an MPD-based player.

   https://github.com/antiprism/mpd_oled

There are specific installation instructions for Moode.

[Image: mpd_oled.jpg]

Demonstration video: https://youtu.be/6pgxGQIAX9s

Adrian.
Reply
#2
Good, but howto connect display on rpi ?
J'ai un string dans l'array
https://blogoflip.fr
Reply
#3
(05-19-2018, 09:56 AM)flipflip Wrote: Good, but howto connect display on rpi ?

Depends on the type of display you want to use. But usually over GPIO

Here is example 
[Image: raspberry_pi_RaspberryPi_bb_fixed.png?1416010082]
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#4
(05-19-2018, 10:05 AM)rikardo1979 Wrote:
(05-19-2018, 09:56 AM)flipflip Wrote: Good, but howto connect display on rpi ?

Depends on the type of display you want to use. But usually over GPIO

Here is example 
[Image: raspberry_pi_RaspberryPi_bb_fixed.png?1416010082]

I thought to use this screen https://www.audiophonics.fr/fr/ecrans-af...11658.html connected on a rpi 1 or 2
J'ai un string dans l'array
https://blogoflip.fr
Reply
#5
Hi

The mpd_oled installation instructions for Moode are here

https://github.com/antiprism/mpd_oled/bl...L_MOODE.md

If you don't need such a big screen, a 1.3" screen can be bought very cheaply. I use this one

https://www.ebay.es/itm/1-3-White-OLED-L...1395109681

I wire it like this
[Image: wiring_i2c.png]

If you are using a PI 1 or 2 it looks like the connections are the same, but you could check that. In the image below it looks like the I2C bus will be zero, rather than 1 like it is with the Pi Zero. mpd_oled should check buses 0 and 1, but this is untested.

[Image: RpiDevices_htm_411098cd.jpg]


If you are using the screen in your link, for mpd_oled you should connect it as I2C (not SPI). VCC is 3.3V, D0 is SCL, D1 is SDA. You may or may not need to connect the reset RST, if you do need to, indicate the GPIO you are using with "mpd_oled -r NN". The I2C address is 3D, and this needs to be passed with "mpd_oled -a 3d". The screen says it is compatible with SH1106, and so specify "mpd_oled -o 6".

Please be aware though, while it seems from the specifications like the screen in your link should work with mpd_oled, I don't have enough experience or feedback to say with any certainty that it will work (I really don't know). Also, I have no feedback about mpd_oled running on a Pi 1 or 2. However, if you choose to buy this screen, or any other, and are having trouble getting it working then I will be happy to help.

Adrian.
Reply
#6
(05-19-2018, 01:42 PM)adrii Wrote: Hi

The mpd_oled installation instructions for Moode are here

https://github.com/antiprism/mpd_oled/bl...L_MOODE.md

[cut]

Hi,
thank you for your project!
Everything works except the spectrum analyzer, I followed all the instructions but it doesn't work, there is a flat line.

I checked the "mpd.conf" file and there is no trace of "mpd_oled_fifo.conf"contents, is that correct?

Thank you
Reply
#7
Hi

The  mpd_oled_fifo.conf contents need to appear in mpd.conf for the spectrum analyser to work. I have reviewed the installation instructions and I can see that the commands that set this up are missing the 'sudo', and so probably failed to run correctly. I will update the installation instructions.

If you change to the mpd_oled source directory and run
Code:
sudo cp mpd_oled_fifo.conf /usr/local/etc/
sudo patch -d/ -p0 -N < moode_mpd_fifo.patch
Then restart the machine, the spectrum analyser will now hopefully work (no need to rebuild mpd_oled).

Thanks for letting me know about this, and please let me know if the display is now running correctly.

Adrian.
Reply
#8
Adrian, this looks great !

I've been using 16 x2 and 20 x4 LCDs  but find them a bit unwieldy for fitting to some projects and the display could be better from them..so this setup is just what I've been looking for.

I have ordered a couple and look forward to setting them up using your very well documented method..Thanks !
----------
bob
Reply
#9
(05-21-2018, 05:52 PM)adrii Wrote: Hi

The  mpd_oled_fifo.conf contents need to appear in mpd.conf for the spectrum analyser to work. I have reviewed the installation instructions and I can see that the commands that set this up are missing the 'sudo', and so probably failed to run correctly. I will update the installation instructions.

If you change to the mpd_oled source directory and run
Code:
sudo cp mpd_oled_fifo.conf /usr/local/etc/
sudo patch -d/ -p0 -N < moode_mpd_fifo.patch
Then restart the machine, the spectrum analyser will now hopefully work (no need to rebuild mpd_oled).

Thanks for letting me know about this, and please let me know if the display is now running correctly.

Adrian.

Hi Adrian,
thank you for your prompt reply.
I already executed the commands as super user (I noticed the "permission denied" error) at the first time... If I re-execute the patch command it says something like "already patched", is there a way to "remove" the patch and reapply it?
I also tried to manual copy the content of mpd_oled_fifo.conf into mpd.conf and it doesn't work.

Thank you in advance
Reply
#10
Hi

If the patch program reports that the patch is already applied then that should mean that the changes were applied correctly.

There seem to be two factors in getting mpd.conf regenerated with the FIFO included: the Moode software appears to be cached, and so patches won't necessarily be seen straight away; the software has to receive a trigger to regenerate /etc/mpd.conf.

I have just checked the time stamp on my /etc/mpd.conf, and I can see that it has not been regenerated by a machine restart

Code:
pi@moode:~ $ ls -l /etc/mpd.conf
-rw-rw-rw- 1 mpd audio 1675 Apr 28 08:41 /etc/mpd.conf

In which case, in the Moode UI go to "Moode" / "Configure" / MPD, and click the first "APPLY" button on that page. This appears to trigger the regeneration of /etc/mpd.conf

Code:
pi@moode:~ $ ls -l /etc/mpd.conf
-rw-rw-rw- 1 mpd audio 1675 May 22 09:27 /etc/mpd.conf

If this works out, I will amend the installation instructions to carry out this action after the machine restart (which appears to clear the cache of the unpatched Moode software).

Thanks for the feedback!

Adrian.
Reply


Forum Jump: