Closed pacmac closed 5 years ago
If you look at the driver code you'll see that the framebuf
results from composition rather than inheritance. I guess it was written before the facility to inherit from framebuf
was developed.
I managed to successfully convert the driver to inheritance:
https://github.com/pacmac/micropython-share/blob/master/sh1106_i2c.py
I suggest you submit a PR: I'm sure Robert will appreciate it. Subclassing framebuf
offers the benefit of providing the framebuf
graphics primitives at zero cost.
Hi Peter;
https://github.com/robert-hh/SH1106
Am trying to use the writer with the sh1106 but I get:
ValueError: Device must be derived from FrameBuffer.
But it looks like this is derived from framebuffer ??