Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitmap Label does not update using displayio #45

Open
EAGrahamJr opened this issue Jul 11, 2024 · 1 comment
Open

Bitmap Label does not update using displayio #45

EAGrahamJr opened this issue Jul 11, 2024 · 1 comment

Comments

@EAGrahamJr
Copy link
Contributor

EAGrahamJr commented Jul 11, 2024

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.

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

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 😃

@EAGrahamJr
Copy link
Contributor Author

NOTE This is not reproducible using "plain ol'" CP -- I put the same SSD1306 display on an RP2040 via the STEMMA port with the following packages:

Found device at /media/edgjr/CIRCUITPY, running CircuitPython 9.1.0.
adafruit_displayio_ssd1306==2.0.2
adafruit_framebuf==1.6.5
adafruit_ticks==1.0.13
adafruit_bus_device==5.2.9
adafruit_bitmap_font==2.1.2
adafruit_display_text==3.1.2

This suggests to me that the issue lies in the Blinka implementation of the bitmap_label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant