The Xteink X4 has a lovely 800x480 eInk display. That's a lot of pixels! The display can be accessed as board.DISPLAY in CircuitPython or you can use the SSD1677 driver. The demo code below lets you show a different dithered image starring the Circuit Playground characters every time you press one of the buttons on the eReader.
Library Usage with Web Workflow
To use with CircuitPython, you need to first install the libraries into the lib folder and upload the bitmap images onto the Xteink X4. Then you need to update code.py with the example script.
In the example below, click the Download Project Bundle button below to download the necessary libraries and the code.py file in a zip file.
# SPDX-FileCopyrightText: 2026 Liz Clark for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
Xteink X4 bitmap test
"""
import os
import board
import displayio
from adafruit_xteink_x4 import InputManager
display = board.DISPLAY
groups = []
images = []
for filename in os.listdir('/'):
if filename.lower().endswith('.bmp') and not filename.startswith('.'):
images.append("/"+filename)
print(images)
for i in range(len(images)):
splash = displayio.Group()
bitmap = displayio.OnDiskBitmap(images[i])
tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)
splash.append(tile_grid)
groups.append(splash)
index = 0
display.root_group = groups[index]
display.refresh()
buttons = InputManager()
while True:
buttons.update()
if buttons.any_pressed:
for i in range(7):
if buttons.was_pressed(i):
index = i
if buttons.any_released:
for i in range(7):
if buttons.was_released(i):
held = buttons.held_time
print(f"Released: {buttons.button_name(i)} (held {held:.2f}s)")
print("updating display..")
display.root_group = groups[index]
display.refresh()
print(f"showing {images[index]}")
Extract the contents of the zip file. You'll see the following contents in the extracted folder:
In the Web Workflow Code Editor, click the Open button.
Next, you'll upload the code.py file and bitmap files to the Xteink X4. Click the Upload button and then Upload Files.
The seven bitmap images are loaded as OnDiskBitmaps. In the loop, the button you press will update the display to show the associated bitmap image.
Page last edited March 18, 2026
Text editor powered by tinymce.