Otherwise, the following initialization of my hardware results in working display:MicroPython v1.11-8-g48dcbbe60 on 2019-05-29; ESP module with ESP8266
Type "help()" for more information.
>>> import writer_demo
Test assumes a 128*64 (w*h) display. Edit WIDTH and HEIGHT in ssd1306_setup.py for others.
Device pinouts are comments in ssd1306_setup.py.
writer_demo.test() for an I2C connected device.
writer_demo.test(True) for an SPI connected device.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "writer_demo.py", line 41, in test
File "ssd1306_setup.py", line 63, in setup
TypeError: can't convert str to int
Thanks,from machine import Pin, I2C
from time import sleep
# ESP32 Pin assignment
#i2c = I2C(-1, scl=Pin(22), sda=Pin(21))
# ESP8266 Pin assignment
i2c = I2C(-1, scl=Pin(5), sda=Pin(4))
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)