Skip to content

The screen

128×64, one bit per pixel.

with eilik.connect() as robot:
robot.screen.show("face.png") # scaled, thresholded, rotated for you
saved = robot.screen.read() # 1024 bytes, the panel's own order
robot.screen.clear()

show takes either a path or a Pillow image, or a ready 1024-byte framebuffer. The difference is deliberate: an image is converted here, including the 180 degree rotation the panel needs, while a framebuffer is already in the panel’s order and goes out untouched. Rotating it again would undo work you had already done.

pack and unpack in eilik.screen convert between framebuffers and a 64×128 grid of 0/1 with no dependencies at all.

The panel is SSD1306 page mode: 8 pages of 128 columns, and within a byte the least significant bit is the top row of its page. Pixel (x, y) is bit y % 8 of byte (y // 8) * 128 + x.

The panel is mounted rotated 180 degrees relative to that byte order, so a buffer written as-is appears upside down.