Skip to content

Bitmap demo broken? #17

Open
Open
@Pharkie

Description

@Pharkie

Thank you for a great project. In

gui/demos/bitmap.py

The path to the demo bitmap files seems wrong. The current code looks for e.g. "m00" in the filesystem root, but the files are in

/optional/bitmaps/

Changing this function in bitmap.py works for me:

    def cb(self, _):
        file_path = f"/optional/bitmaps/m{self.image:02d}"
        if file_path.split("/")[-1] in os.listdir("/optional/bitmaps"):
            self.graphic.value(file_path)
            self.image += 1
            self.image %= 4
            if self.image == 3:
                self.graphic.color(BLUE)
            else:
                self.graphic.color(WHITE)
        else:
            print(f"File not found: {file_path}")

(I'm afraid I don't know how to contribute the fix directly via pull request)

I will also note that I'm using a Waveshare RP2350 1.28" round display and it works perfectly with the existing setup offered in

setup_examples/gc9a01_ws_rp2040_touch.py

This new device seems to use:

Display: GC9A01
Touch: CST816T

Just with the Pico2 MCU, the RP2350.

Best wishes,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions