I'm following this guide: https://learn.adafruit.com/micropython- ... icropython
But it may be out of date by now? If i use ampy to put the ssd1306.py file on the esp32 I can import it but when I try the following i get an error.
Code: Select all
>>> import machine
>>> import ssd1306
>>> spi = machine.SPI(1, baudrate=8000000, polarity=0, phase=0)
>>> oled = ssd1306.SSD1306_SPI(128, 32, spi, machine.Pin(15), machine.Pin(0), machine.Pin(16))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SSD1306_SPI'