adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306

Bitmap Label does not update using displayio

Open
#45 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
72
Forks
23
PR merge metrics
No merged PRs in 30d

Description

The following code (supplied by `todbot` on Discord and modified) shows that the `bitmap_label` does _not_ update (or very slowly/sporadically) while the "regular" version flies.

```python
import time, board, displayio, i2cdisplaybus, terminalio
import adafruit_displayio_ssd1306

# Select one to run
# from adafruit_display_text import bitmap_label as label
from adafruit_display_text import label as label

displayio.release_displays()
dw,dh = 128, 32

i2c = board.I2C()
display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=dw, height=dh)
display.wake()

maingroup = displayio.Group()
display.root_group = maingroup
text1 = label.Label(terminalio.FONT, text="helloworld...", x=0, y=4)
text2 = label.Label(terminalio.FONT, text="@edgjr ", x=0, y=19)

for t in (text1, text2):
maingroup.append(t)

while True:
try:
text2.text = "%.1f" % time.monotonic()
time.sleep(0.1)
except KeyboardInterrupt:
break

display.sleep()
```
Tested on Raspberry Pi Zero W, `bookworm` 32-bit

[requirements.txt](https://github.com/user-attachments/files/16183068/requirements.txt)

The _expectation_ is that the behavior should be similar. I do not know if this behavior is present on other displays like this since this is the only one I have at the moment :smiley:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the supplied Raspberry Pi Zero W reproduction with requirements.txt, switching between bitmap_label and label as shown. Compare the two update paths and inspect the SSD1306/displayio refresh behavior. Done means bitmap_label updates reliably at the same cadence as the regular label.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.