examples: add 2.13in e-Paper V1 demo for RP2040-PiZero - #890
Merged
conejoninja merged 1 commit intoSep 10, 2026
Merged
Conversation
conejoninja
reviewed
Sep 10, 2026
Exercise all four SetRotation modes in the demo. Fix epd2in13.Size(), which reported the padded logical buffer width instead of the true panel width at rotation 90 and 270. This clipped the last few rows on those rotations because the driver bounds check used the true width while Size() reported the padded width. Scale the dither ramp and solid block to the panel height instead of fixed pixel offsets, so they fit inside the shorter 122 pixel dimension at rotation 90 and 270.
davecheney
force-pushed
the
davecheney-epd2in13-pizero-demo
branch
from
September 10, 2026 02:53
19e7293 to
251903e
Compare
Contributor
Author
|
@conejoninja PTAL, i also verified rotation was working IMG_2519.MOV |
Member
|
Thanks for your contribution! Merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a hardware bring-up demo for the Waveshare 2.13in e-Paper HAT V1 driven by a Waveshare RP2040-PiZero.
What it does
The demo clears the panel, then draws a test pattern chosen so that a partial result localises the fault rather than just reporting failure:
It logs progress over USB serial and then enters deep sleep, since an e-paper panel holds its image without power.
Scope
The header comment is explicit about what this is verified against, because the driver is not interchangeable across panel revisions.
epd2in13sends the IL3820 init sequence and a 30 byte LUT. V2 and later use the SSD1680, which needs a different init sequence and a 153 byte LUT, so this demo will not drive them. The comment lists the panel revisions and boards as known working, untested, and not supported, and explains how to identify a panel from the ribbon cable date code.Verification
Flashed to real hardware with
tinygo flash -target=pico -monitor. The panel rendered the complete pattern, which confirms SPI1 clock and data, the CS, DC, RST and BUSY pins, the IL3820 init sequence, and the RAM write. Serial output was:gofmtis clean andtinygo build -target=picosucceeds.One caveat worth flagging for reviewers: only the RP2040-PiZero with a V1 panel is marked as tested. The suggestion in the comment to try
epd2in9v2for SSD1680 panels is a starting point rather than a verified path, since that package targets a 2.9in panel and would need Width and Height overrides. I did not have the hardware to confirm it.