Created
September 20, 2018 05:31
-
-
Save jasonblewis/4285f1a08b899d40147a1334ed197e07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import machine, time | |
from ssd1306 import SSD1306_I2C | |
WIDTH = const(132) | |
HEIGHT = const (64) | |
sda_pin = 21 | |
scl_pin = 22 | |
i2c = machine.I2C(scl=scl_pin, sda=sda_pin, speed=400000) | |
ssd = SSD1306_I2C(WIDTH, HEIGHT, i2c) | |
import freesans20 | |
from writer import Writer | |
wri2 = Writer(ssd, freesans20, verbose=True) | |
Writer.set_clip(True, True) | |
for y in range(0,HEIGHT-1): | |
for x in range(0,WIDTH-1): | |
Writer.set_textpos(x, 0) | |
wri2.printstring('{} {} MicroPython\nby LoBo\n10/2017'.format(x,y)) | |
ssd.show() | |
time.sleep(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment