OLED + Piano 2.1 + Kali + Rapsberry 3 ?

Did you try

vol_oled -o3

for your display?

sudo ./vol_oled -o 3-b 10 -g 1 -f 20

yes, thats the number I used… and tried the others too
:confused:

What do you get for the following command?

sudo i2cdetect -y 1

I get

volumio@volumio3:~$ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
Indicating that my I2C address is 0x3c. Yours might be at 0x3d.

1 Like

Hi, yes it is 0x3D

volumio@volumio:~$ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- 3d -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- UU UU -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

That should be the reason why vol_oled and some other programs aren’t working for you. The OLED library code I have says

#define ADAFRUIT_I2C_ADDRESS   0x3C /* 011110+SA0+RW - 0x3C or 0x3D */

With this being the only place to change it, i.e. the I2C address for your OLED is chosen at compile time.

I have amended the library code to allow an override for the I2C address, and pushed these changes to the vol_oled repository. The instructions to use the updated version are:

If you installed vol_oled, you will need to stop it running

sudo systemctl stop vol_oled

Change to the vol_oled source directory and update the source by running the following [or, start again in a new directory and run git clone github.com/antiprism/vol_oled again]

git pull

If the previous command completes without errors (if you haven’t changed any source files) run

make

You should now be able to test the program with

sudo ./vol_oled -o3 -a 3d -b10

Hopefully it will work now!

hey Adrii, you’re the man !!! that did it… or at least the screen is showing the time now :smiley: :smiley: :smiley:

I tried to put

into /etc/systemd/system/vol_oled.service but I get this message… I did restart the daemon, etc.
in any case, I’m so glad to see some useful information on the screen… thanks !

Mar 17 16:06:32 volumio systemd[1]: Started Volumio OLED Display. Mar 17 16:06:32 volumio vol_oled[1881]: error: unrecognized option -a. Mar 17 16:06:32 volumio vol_oled[1881]: run with '-h'. Mar 17 16:06:33 volumio systemd[1]: vol_oled.service: main process exited, code=exited, status=1/FAILURE Mar 17 16:06:33 volumio systemd[1]: Unit vol_oled.service entered failed state.

That is a good result!

The error message is because the service is trying to run the old binary, which doesn’t have an option -a. As you have edited the installed service file it should be enough to just copy the new binary to the install location, and start the service

sudo cp vol_oled /usr/local/bin sudo systemctl start vol_oled

However, I normally reinstall by editing the vol_oled.service file in the source directory and running

sudo systemctl stop vol_oled sudo bash install.sh

I’ll add something about this to the README.

hey Adrii, it’s working !! thank you so much :smiley: … edit… when launched manually. When I update the services file and reboot the screen is just full of dots. I think there must be a problem with the RST pin or some other sync problem on the J19 header of the Piano DAC as if something is interfering with the signal to the screen … I will be receiving some other displays which I’ll try. This one is getting on my nerves ! :angry: Anyways, this is by far the best I’ve gotten up to now. Thanks.
IMG_8097.JPG

Well done! And, thank you for all your feedback. It has been very useful.

I am using a very cheap OLED that doesn’t have an RST pin. Maybe you could try not connecting the RST pin.

Yep, I’ve ordered a couple of cheap ones from China. Will check them out as soon as they get here.

Some quick observations:

1/ If I restart the Pi3, the screen starts up with random dots

2/ if I pull the Vin and Data cables, then put them back in and then restart vol_oled manually (sudo ./vol_oled -o3 -a3d -b30), the screen works, i.e. I get a clock and the bars when music starts playing (with quite a delay)

3/ when music stops playing, the bars continue to move until I use “systemctl restart vol_oled” to restart vol_oled.

4/ when playing music via Airplay, vol_oled doesn’t seem to pick anything up.

cheers !

  1. I don’t know.

2., 3. It sounds like the Cava framerate is higher than your OLED can display (the spectrum probably doesn’t match the music you are hearing). See
github.com/antiprism/vol_oled#synchronisation
github.com/antiprism/vol_oled#system-settings

  1. Cava processes audio data read from an mpd audio_output FIFO. If the spectrum isn’t being produced (and a clock is displayed by vol_oled) it is probably because no audio data is being written to the FIFO. I don’t know about Volumio and Airplay to suggest why this might be.

Hi Adrii,
I finally found some time to test a couple of cheap OLED 128x64 SSH1106 displays from China … and see, they worked right out of the box thanks to your code :slight_smile:

I was wondering, if it is possible to only show the song title and artist but in a bigger font ? I ask, because the graphic spectrum analyser only works with music playing directly from the Volumio web UI. When I use the (great) Spotify connect plugin or Airplay, all information, except the spectrum analyser is displayed, leaving a blank hole in the top left hand corner.

I just saw over on your github site github.com/antiprism/mpd_oled/issues/4).

So, basically, I don’t really need the spectrum analyser but would love to be able to read the display from a greater distance. Let me know, if you would like me to test something with Airplay or SpotifyConnect.

In the mean time, thanks for the code.

Greetings

Hi snuka

It is possible to enable the spectrum analyser for Spotify (and any other Volumio audio source) by using the technique I gave at the end of the issue you linked to
github.com/antiprism/mpd_oled/i … -423255641
However, it is clearly not a finished solution and will require changes if not using the software mixer and be difficult to integrate into any existing custom ALSA configuration file (e.g. from using the Volumio equaliser plugin).

Regarding excluding the spectrum analyser widget and changing fonts, I started development of custom layouts which would support this. However, I am not currently able to look at new development on mpd_oled and cannot say if or when this feature will be available.

Adrian.

Hi Adrian,
no worries. I’m very happy that it is working with the new OLED’s :slight_smile:
All the best and happy X-mas / New Year to you and all reading.