I get odd results which look a bit like a line length syncing problem.
This code (with the nvbn fork of ssd1306.py)
Code: Select all
import pyb
from ssd1306 import SSD1306
display = SSD1306(pinout={'dc': 'Y3',
'res': 'Y4'},
height=64,
external_vcc=False)
led_red = pyb.LED(1)
led_red.off()
try:
display.poweron()
display.init_display()
# Make sure the corners are active
display.set_pixel(0, 0, True)
display.set_pixel(127, 0, True)
display.set_pixel(0, 63, True)
display.set_pixel(127, 63, True)
# Write display buffer
display.draw_text(0, 0 , 'Hello World')
display.display()
except Exception as ex:
led_red.on()
print('Unexpected error: {0}'.format(ex))
display.poweroff()
I've tried the same OLED with an arduino nano and the demo adafruit code https://github.com/adafruit/Adafruit_SSD1306 and it works well with clear text and smooth fast screen updating.
Any clues? If not what brand of OLED works well with this library?