Moode Forum

Full Version: Yet another OLED Driver!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI

Thanks to ear5142 for the idea and info!

If you follow the Oled part of the  HOW-TO do guides] AUDIOPHONICS RaspDAC Mini Kit - I-Sabre ES9038Q2M, you can make many SPI and i2c  OLED display  with ANY  DAC.  You do not need to add the modified kernel

You must edit the python file to suit your Oled.  ( spi or 2ic, ssd(number) width height etc Your Oled has to be one that the controller chip is supported by the Luma.oled library

I tried it with a new installation Moode 4.4 and a 3.1"  256 x 64  SSD1322 spi  Oled.   It worked fine once I got the wiring connected to the correct pins, (I need new spectacles!).

I am using a DAM1021 DAC. i2s connection only.


The TT fonts are especially nice looking

Here is a picture of it in use

cheers

P
Hi. Have you actually used it with an oled with i2c interface? Do you know which changes to make to the page file to make it work using a i2c interface?
I tried it but I could not figure out which parameters to use with i2c oled. 
I think this is the part of the original page file that need to be changed: 
Code:
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.oled.device import ssd1306
import RPi.GPIO as GPIO
serial = spi(port=0, device=0, gpio_DC=27, gpio_RST=24)
device = ssd1306(serial, rotate=2)

How do you change it for a ssd1306 128x64 oled with i2c interface? 

Remy
#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1306
import RPi.GPIO as GPIO
#serial = spi(port=0, device=0, gpio_DC=27, gpio_RST=24)
serial = i2c(port=1, address=0x3C)
device = ssd1306(serial, rotate=2)
http://moodeaudio.org/forum/showthread.p...70#pid5270
(12-22-2018, 10:26 AM)ear5142 Wrote: [ -> ]#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1306
import RPi.GPIO as GPIO
#serial = spi(port=0, device=0, gpio_DC=27, gpio_RST=24)
serial = i2c(port=1, address=0x3C)
device = ssd1306(serial, rotate=2)
http://moodeaudio.org/forum/showthread.p...70#pid5270

Thanks. Will try it today or tomorrow and let you know.
Remy
(12-22-2018, 07:43 PM)remy1961 Wrote: [ -> ]
(12-22-2018, 10:26 AM)ear5142 Wrote: [ -> ]#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1306
import RPi.GPIO as GPIO
#serial = spi(port=0, device=0, gpio_DC=27, gpio_RST=24)
serial = i2c(port=1, address=0x3C)
device = ssd1306(serial, rotate=2)
http://moodeaudio.org/forum/showthread.p...70#pid5270

Thanks. Will try it today or tomorrow and let you know.
Remy
Hi. It worked with these parameters. I can confirm that we have now another driver for OLED displays using spi or i2c interface. It uses luma drivers.
Remy
Hi

I already told you it all worked!

I am sorry I did not include this reply in my post,   i2c display working by ear5142:-

http://moodeaudio.org/forum/showthread.p...70#pid5270

Merry Christmas everyone.

regards

Patrick
Looking for some advice for this driver/display...
I have a 128x64 sh1106 oled and have configured as per the example...adjusted for my display


Code:
#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import sh1106
import RPi.GPIO as GPIO
#serial = spi(port=0, device=0, gpio_DC=27, gpio_RST=24)
serial = i2c(port=1, address=0x3d)
device = sh1106(serial, rotate=0)


the display works as shown in attached image so basic configuration is correct...

However, I am no coder so other parts of the code are giving me trouble...
I use a USB dac so the current code throws this error...when I run     python moode_oled_1.54_spi_audiophonics.py with no audio playing... as the device it wants is the i2s or spdif of the audiophonics dac..... 

Code:
amixer: Unable to find simple control 'I2S/SPDIF Select',0
This repeats for some time then the display blanks and this error appears...
Code:
(<class 'luma.core.error.DeviceNotFoundError'>, 'moode_oled_1.54_spi_audiophonics.py', 444)

If I start the python code and begin play from MoOde the oled shows briefly some song info then blanks with this error
Code:
(<type 'exceptions.IOError'>, 'moode_oled_1.54_spi_audiophonics.py', 275)
I know the errors reference the lines from the code but have no idea what to change...
Any help would be appreciated, thanks