I want to use the “image” object to draw stuff to a 128x64 OLED that uses the SSD1306 chipset. I see that there’s a 3rd party library already, but the link from the docs just link to the source code.
It’s not too hard to understand but I can’t find an example, so I just want to confirm here:
i2c = pyb.I2C(2, pyb.I2C.MASTER) oled = ssd1306.SSD1306_I2C(128, 64, i2c) oled.framebuf = image.Image(126, 64, sensor.binary) oled.framebuf.draw_circle(...) oled.show()
The above code doesn’t make sense, because the init of SSD1306 will have already called .show() and .framebuf would be undefined, causing an exception. This would not happen with SPI because the SPI init creates a frame buffer, the I2C init does not create a frame buffer.
That’s why I’m asking here. What’s the right way of using that library?