SSD1306 error
Posted: Sun Apr 04, 2021 9:40 am
PyBoard running 1.14. I copied ssd1306.py from latest to the board (not from 1.14 since I can't figure out how to download files from a tag on Github without downloading the entire source as a zip). Then I tried the following and got this error:
Line 119 is:
The change to writevto is one of the most recent changes to this file, but it's still a few years old. I think it ought to work. What am I doing wrong?
Any thoughts?
Code: Select all
MicroPython v1.14 on 2021-02-02; PYBv1.1 with STM32F405RG
Type "help()" for more information.
>>> import machine, ssd1306
>>> i2c = machine.I2C('X')
>>> oled = ssd1306.SSD1306_I2C(128, 32, i2c, 0x3c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ssd1306.py", line 110, in __init__
File "ssd1306.py", line 36, in __init__
File "ssd1306.py", line 73, in init_display
File "ssd1306.py", line 101, in show
File "ssd1306.py", line 119, in write_data
TypeError: object with buffer protocol required
>>>
Code: Select all
self.i2c.writevto(self.addr, self.write_list)
Any thoughts?