#Progress bar method not working properly on my ST7735R display

1 messages · Page 1 of 1 (latest)

graceful needle
#

New to both python and circuitpython here, so I’m doing all the newbie struggles, despite having done a bunch of c/AVR stuff in the past. (and apologies in advance for any newbie faux pas I might make.) I’m using the ST7735R-based adafruit 1.44” TFT display, and trying to get the progress bar method to work. I had a few other things working on the display, so my first step was to take the progressbar_simpletest.py example and try to get it running on my hardware (Raspberry Pi 4). The example ran without errors, but it only painted the outline of the progress bar on the display, not the moving bar itself. I’ve poked and prodded a bit, and added some debugging odds and ends, but with no success. One thing I added was reporting the value of progress_bar.progress, which shows 0, 0.01, 0.02… as the program runs.

Is there something about the ST7735R that’s making this not work? I can’t think of anything else that’s different between the example and my setup. All methods (and my pi iso) were downloaded in the last week or so, so they should be current. Most likely my issue is some sort of newbie error, but I’d be grateful for any insight or wisdom offered. (test file attached)

round delta
# graceful needle New to both python and circuitpython here, so I’m doing all the newbie struggles...

Maybe try changing the color of the bar to rule out any issues with displaying certain colors or others.

By default the bar is drawn as green. This initializer changes it to white:

progress_bar = HorizontalProgressBar(
    (x, y), (width, height),
    bar_color=0xffffff,
    direction=HorizontalFillDirection.LEFT_TO_RIGHT,
)

As a quick sanity check I took your code and chopped out the bits specific to your display and ran it on a pyportal titano and confirmed it does fill in the bar for me.

graceful needle
#

I had tried that, but I tried it again, with no change. As an experiment, I also set fill_color and outline_color to new values. Those new values (red and blue in my case) did show on the display, but the progress bar still did not.

round delta
# graceful needle I had tried that, but I tried it again, with no change. As an experiment, I also...

I don't have much else in the way of ideas.

Are you using Blinka with the pi4? or running circuitpython baremetal?

If you have a different microcontroller that you could try hooking up the same display with it could rule in or out issues with the specific display like you had asked about. My gut instinct is that something about the pi4, or perhaps even pi in general might be the root cause. But I can't really imagine what specific thing could be the culprit so it's just kind of a whim more than anything.

graceful needle
#

I'm running blinka. I suppose I could try baremetal. I don't have any other circuitpython-capable processors in inventory at the moment. The fact that various other displayio examples seem to work just fine (eg. display_shapes_circle_animation.py) has me puzzled. My final project will use a different display, so maybe that's what I should try next (assuming that no one swoops in here with the answer.) But I appreciate your trying the code on your titano - at least I know my problem is nothing obvious.

round delta
#

I think baremetal is likely to be more problematic than Blinka honestly. It's very alpha support only for baremetal.

It is very odd that the rest of the stuff like shapes and things do render. The progress bar uses a TileGrid internally to represent itself visually which is a fairly basic and fundamental piece of displayio. I can't think of what would cause it but there must be some slight difference in handling of some portion of it.