Forum

You need to log in to create posts and topics.

OLED 1.5 display

Hi,

I really like NanoSound device, specially the use of larger OLED 1,5" display and tactile buttons for control.

What I'm trying to do is to use OLED 1,5" display with HiFiBerry Digi+ card. This is I2S spdif output board that plugs onto Raspberry.

 

Of course it doesn't work together 🙂

 

In my current setup nanoSound plugin is installed and 1.5 OLED is selected. However DiGi+ card is selected as ouput, not Nonosound DAC 2. The system works fine, there is spdif output which I feed into external DAC, but my OLED 1,5" screen shows startup screen all the time ("Nanosound x Volumio, NanoSound v1.7.o IP adress" is diplayed).

 

Is it possible, and what should I change in supplied source code to use OLED screen with HiFIberry I2S output device?

Hope you will help me alter the python code and make OLED work. Some information on screen can be sacrified if needed...

Here is where the code halts:

 

file: nanodac_oled.py

if(self.isColour):
    albumartimage = Image.open("logo/splash.png") \
                .transform(device.size, Image.AFFINE, (1, 0, 0, 0, 1, 0), Image.BILINEAR) \
                .convert(device.mode)

    bgd = Image.new("RGBA", device.size, "black")
    bgd.paste(albumartimage, (5, 1))
    mydither = True
    
    with canvas(device, background=bgd, dither=mydither) as draw:

        if lanip != '':
            ip = lanip
        elif wlanip != '':
            ip = wlanip
        else:
            ip = "volumio.local"

        draw.text((3, 65), 'NanoSound v1.8.0', font=self.fonts['small'], fill='white')
        draw.text((3, 80), ip, font=self.fonts['small'], fill='white')
        draw.text((3, 95), "Nano..nesto", font=self.fonts['small'], fill='white')

Any idea how to get to "normal paying music" screen?

The screen display code has nothing special about which audio device to use, it even works without a DAC.  It is simply fetching status from volumio and display it on OLED.

Suggest to check if any line caused an exception and quitted.

 

Ok, I was thinking that.

I was unable to find pin assignment definition in files provided on github, so I'm not sure if I wired OLED correctly.

Can you please point me to the file with pin definitions or just check if mine are good:

OLED >    raspberry 3B+

vcc>3V3

gnd>GND

DIN>MOSI GPIO 10 (PIN19)

CLK> GPIO 11 (PIN 23)

CS> GPIO 8 (PIN 24)

DC> GPIO 24 (PIN 18)

RST> GPIO 25 (PIN 22)

 

Since pins CS, DC and RST are software defined It's most likely my guess wiring is wrong 🙂

 

Well it seems my wiring is OK. This is what I found on driver documentation page (luma.OLED display driver):

 

 

Uploaded files:
  • spi_oled_config.JPG

Some detail here

There are 2 pin out possible

1)  but using --gpio-data-command=25 --gpio-reset=24 

1 | GND | P01-20 | GND | Ground
2 | VCC | P01-17 | 3V3 | +3.3V Power
3 | SCL | P01-23 | GPIO 11 (SCLK) | Serial Clock
4 | SDA | P01-19 | GPIO 10 (MOSI) | Serial Data
5 | RES | P01-18 | GPIO 24 | Reset
6 | DC | P01-22 | GPIO 25 | Data/Command
7 | CS | P01-24 | GPIO 8 (CE0) | Chip Select

2)

1 | GND | P01-20 | GND | Ground
2 | VCC | P01-17 | 3V3 | +3.3V Power
3 | SCL | P01-23 | GPIO 11 (SCLK) | Serial Clock
4 | SDA | P01-19 | GPIO 10 (MOSI) | Serial Data
5 | RES | P01-18 | GPIO 25 | Data/Command

6 | DC | P01-22 | GPIO 24 | Reset
7 | CS | P01-24 | GPIO 8 (CE0) | Chip Select

avoid using breadboard as they might cause interference and remember to enable spi