Pycom GPy and ssd1306.py. writevto()
Posted: Thu Oct 29, 2020 12:28 am
I trying to port working code from Pyboard (or ESP8266, both works) to a GPy.
The GPy runs (Pycom MicroPython 1.20.2.r1 [v1.11-a5aa0b8] on 2020-09-09; GPy with ESP32
The code depends on the font_to_py.py library, which specifies that the 'official' ssd1306.py driver be used.
This driver contains the following:
def write_data(self, buf):
self.write_list[1] = buf
self.i2c.writevto(self.addr, buf)
Initializing ssd1306.py returns:
: AttributeError: 'I2C' object has no attributes 'writevto'
I checked:
>>> dir(I2C)
['__class__', '__name__', 'MASTER', 'deinit', 'init', 'readfrom', 'readfrom_into', 'readfrom_mem', 'readfrom_mem_into', 'scan', 'writeto', 'writeto_mem']
>>>
What hackery should I perform to get this to work?
The GPy runs (Pycom MicroPython 1.20.2.r1 [v1.11-a5aa0b8] on 2020-09-09; GPy with ESP32
The code depends on the font_to_py.py library, which specifies that the 'official' ssd1306.py driver be used.
This driver contains the following:
def write_data(self, buf):
self.write_list[1] = buf
self.i2c.writevto(self.addr, buf)
Initializing ssd1306.py returns:
: AttributeError: 'I2C' object has no attributes 'writevto'
I checked:
>>> dir(I2C)
['__class__', '__name__', 'MASTER', 'deinit', 'init', 'readfrom', 'readfrom_into', 'readfrom_mem', 'readfrom_mem_into', 'scan', 'writeto', 'writeto_mem']
>>>
What hackery should I perform to get this to work?