Odroid N2 OLED I2C / SPI driver

Thank you. The 1.3" seems to work stock. But the 2.4" need more wires and change programm code again?

Perhabs I can play width it myself? How do you make the fonts? Can I make a font for myself and change it?

But I think I must buy a greater display…

Okay I’ve ordered the 1.3" one. :slight_smile:

Hey it’s me again.
I’ve greated now a really big font for the clock so that you can easily read it from 5 meters away.

I had some ideas I want to implent but im not a so good python programmer.
I want to implent that the brightness is dimmed in the night and that’s bright again in the morning.

Then it where great when the oled shows the pvr iptv channel you watch.

And last but not least in idle could the oled switch every 10 seconds the view clock and then the temperature of the weather plugin?

Perhabs you are faster in program this nice addons to it than me?

Thank you again for your great plugin. I enjoy it every day :slight_smile:

Can I just say thanks to roidy for this.

It worked with ODroid C2 and no-name 1306 128x64 OLED i2c display first time. (SDA and SCL connected to physical pin numbers 3 and 5 on the C2 GPIO)

Is the plug-in still in development?

(Would it make sense to put a C2/N2 option in the settings UI? It didn’t look like the GitHub code had this?)

Also - as in Live TV mode the duration/time doesn’t seem to make much sense (it doesn’t seem to get the data that the OSD does?) I wonder if channel name/number might make more sense on the OLED. If I get a chance I’ll see if I can have a play…

Hello!
can you help me to port this font (Matrix DOT) for C code?
I want to use this font by STM32 and OLED display SSD1306 on my library.

Regards,
Roman

I support this idea

Hello @roidy
I tryed a 2.42" OLED display with SSD1309 128x64 and soldered to I2C mode.
I had some hope it will work with your plugin since the SSD1309 and SSD1306 seem to be quite similiar.
Is there any chance to get this display working with your plugin?
There would be much benefit from a bigger display because the 1,3" one is too small to read from distance.

This is the display I bought:

And this is the logfile from Kodi:

2020-06-23 15:43:24.805 T:3741279104 NOTICE: service.odroidn2.oled v0.1.4 -> Service started
2020-06-23 15:43:25.091 T:3741279104 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<–
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type ‘exceptions.IOError’>
Error Contents: [Errno 6] No such device or address
Traceback (most recent call last):
File “/storage/.kodi/addons/service.odroidn2.oled/service.py”, line 234, in
oled = OledAddon(monitor)
File “/storage/.kodi/addons/service.odroidn2.oled/service.py”, line 63, in init
self._settings.flipDisplay())
File “/storage/.kodi/addons/service.odroidn2.oled/lib/oled.py”, line 54, in init
self._initSSD1306_64()
File “/storage/.kodi/addons/service.odroidn2.oled/lib/oled.py”, line 105, in _initSSD1306_64
self._command(DISPLAYOFF)
File “/storage/.kodi/addons/service.odroidn2.oled/lib/oled.py”, line 67, in _command
self.bus.write_byte_data(self._i2c, 0x00, c)
File “/storage/.kodi/addons/service.odroidn2.oled/lib/smbus2.py”, line 391, in write_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
IOError: [Errno 6] No such device or address
–>End of Python script error report<–

Assuming you have made the correct modifications to put the display into I2C mode then the error you are getting is an incorrect address error. Have you tried both address settings in the add-on? Does the documentation that comes with the display tell you what I2C address it uses?

Or it could just be that the SSD1309 isn’t compatible with the SSD1306 code. I’m sure it could be adapted to work but I don’t have access to a display with a SSD1309 controller to make the changes and test.

I tryed every combination of the settings in your plugin.
I asked the seller of the display if their instructions are right, but i don’t have an answer yet.
There is not much documentation about the display but a minute ago I read in the comments on their site that other people had problems too.
Seems there is something more to solder which is not in their instructions.
I will try this tomorrow and post an update here.

Which CoreELEC version are you using? Because I’ve just updated to nightly_20200621 and I’m now getting the same error, so it could be a nightly problem, it has happened in the past where a nightly has broken I2C.

In last nightlies the SPI interface got added on N2/C4.
But it is disabled by default. So you may try to find last working nightly and make a dmesg with working and the next nightly not working. Thank you.

Which nightly was SPI added so I know where to limit my search to?

One of the last 2-3

I’m on the latest stable 9.2.3
The 1,3" Display works like a charm.
Unfortunately I couldn’t get the 2,42" one to work but I am pretty sure that it could work since I had the clock shown on the display for about a second while shortening R7 with holding a nail on it.
But after soldering R7 today I couldn’t redo this.
Maybe I destroyed my display but I don’t know.
I’m still waiting for an answer from the seller.

Thanks, just rolled back to 20200619 and I2C worked, then upgraded back to 20200621 and I2C still works, so I suspect it was just a glitch and there is nothing wrong with I2C.

I just wanted to give an update about the 2,42" display:
With lots of soldering it works

For anyone trying to do the same here an summary:

  • move R4 to R3 and solder R5 and R7 each one with 0 ohms resistor
  • solder a k-ohms resistor between RES and VCC ( in my case 10 k-ohms, but other values should work too)
  • solder a µF capacitor between RES and GND ( in my case 10 µF , but other values could work too)[/b][/size]

This is the display I bought:
https://www.diymore.cc/products/2-42-inch-12864-oled-display-module-iic-i2c-spi-serial-for-arduino-c51-stm32-green-white-blue-yellow?variant=17060396433466

1 Like

Excellent :smiley: That looks really good.

Now that CoreELEC has SPI support I may get one and write an SPI driver for it.

1 Like

This one seems to be the same pcb but is a lot cheaper:

If connecting via SPI, the display should refresh faster so counting down the seconds of the remaining time should be a little bit smoother or am I wrong?

Yes, SPI is much faster than I2C so the refresh rate would be much better.

Then it would be a great benefit.
Maybe you can do some magic to get it to work :wink:

Unfortunately, the display broke today in operation while watching a movie.
Don’t know what happened, maybe the soldering wasn’t right.
I am quite confused what caused this because it worked for some days without a problem.
I just wanted to let you know that (maybe) my summary is not quite right.
Now I have to order another one and try my best