new to xiao and its nice expansion board, i wonder which display library to use (reduce memory footprint and enhanced efficiency and functionalities… and a maintained lib…
It seems that adafruit_displayio_ssd1306 and adafruit_ssd1306 can be used.
I only managed to make the later work BUT only with 32 lines modes to drive the 128*96 expansion board display. Got memory error when trying 64 lines mode.
This is not convincing then which lib to choose ?
Also, i recommend that if a clean working example is available with the expansion board, it should be shown in the Xiao wiki.
Currently, here is my trial with the following files added to the lib folder:
- adafruit_bus_device (folder with 3 files in)
i2c = board.I2C()
oled = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, addr=0x3c) # Clear display. oled.fill(1) oled.show()
=> this code works but is minimal and skips one display line out 2.
If moving to 64 lines instead of 32, here is the error message:
code.py output: Traceback (most recent call last): File "code.py", line 5, in <module> File "adafruit_ssd1306.py", line 231, in __init__ MemoryError: memory allocation failed, allocating 1025 bytes