The file is called ssd1306.py and you can place it next to your main.py. after that, you can use code like:
Code: Select all
from ssd1306 import SSD1306
display = SSD1306(pinout={'sda': 'Y1',
'sck': 'Y2',
'dc': 'Y3',
'res': 'Y4',
'cs': 'Y5'},
external_vcc=True)
current = False
try:
display.poweron()
display.init_display()
while True:
current = not current
display.set_pixel(0, 0, current)
display.display()
pyb.delay(1000)
except:
display.poweroff()
Maybe a folder per library with in that folder the py file(s) and a readme with more information.
Any suggestions?