Skip to content
Snippets Groups Projects
Commit c5b93c1f authored by Kirsa's avatar Kirsa
Browse files

commmit

parent 8eb19bdc
No related branches found
No related tags found
No related merge requests found
import sys, time, framebuf
sys.path.insert(0, 'libraries')
from machine import Pin, I2C
import ssd1306
# using default address 0x3C
i2c = I2C(sda=Pin(21), scl=Pin(22))
display = ssd1306.SSD1306_I2C(128, 64, i2c)
image = bytearray(b'\x80\x01\xf0\x07\xc0\x1f\x000\x07\x03\xfc\x07\xcf\xfc\x10\x80\x00\xe0\x03\x80\x0e\x00\x00\x06\x01\xf8\x07\x8f\xe8p\x00\x00@\x01\x00\x04\x00\x00\x00\x00\xf0\x03\x0f\xe0\xf0\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00p\x01\x07\xc1\xf0\xc0\xf8\x03\x81\x0e\x04\x1c\x10\x00\x000\x00\x03\x83\xf0\xf0\xf8\x03\x87\x0e\x1c<0\x000\x10\xc0\x01\x87\xf0\xe1\xf8\x01\x0f\x04<0\xf0`8\x00\xc0\x01\x87\xf0\xe1\xf0\x80\x1e\x00x!\xf0p<\x00\x80\x00\x07\xf0\xe1\xe1\xc0;\x00\xe8\x03\xe0x|\x00\x00@\x07\xf0\xe1\xc3\xe0w\x81\xd8G\xe0\xf8~\x01\x00`\x07\xf0\xc1\x07\xe0\x07\x80\x18o\xe0\xf8~\x01\x80p\x03\xf0\x80\x1f\xf0\x07\xc0\x18\x7f\xe1\xf0~\x01\xf8\x7f\x03\xf0\x86?\xf8\x03\xe0\x08\x7f\xf3\xe0\x7fA\xf0\x7f\x07\xf0\x8f\x7f\xfc\x0f\xf01\xff\xff\xe1\xff\xe7\xf9\xff\x07\xf0\xbf\xff\xff\xff\xff\xff\xff\xff\xf1\xff\xff\xff\xff\xc7\xf0\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff\xff\xef\xf0\n')
fb_image = framebuf.FrameBuffer(image, 116, 16, framebuf.MONO_HLSB)
display.fill(0)
display.blit(fb_image, 0, 0)
vertical = 64
while True:
vertical = vertical - 1
if vertical >= 0:
display.scroll(0, 2)
display.show()
else:
display.fill(0)
display.blit(fb_image, 0, 0)
display.show()
vertical = 64
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment