Repository navigation
Play GIF animation on e-paper displays - #11720
Closed
mikeysklar wants to merge 12 commits into
Closed
mikeysklar wants to merge 12 commits into
mikeysklar wants to merge 12 commits into
Conversation
Packed pixels with each row padded to a whole byte, so a 1-bit source can stream into a plain buffer. Framebuffer targets stay whole bytes per pixel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bits_per_pixel argument picks RGB565 or packed 1-bit frames, for e-paper. A pixel is white when its luma is at least half, so a black and white GIF converts exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnimatedGIF refuses anything wider than 320 pixels, so 400x300 and 800x480 e-paper animations would not open. CIRCUITPY_GIFIO_MAX_WIDTH stays 320 by default, so other boards don't pay for a longer line buffer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy whole bytes when the rects line up and no layer above claimed the pixels. Polarity and bit order already match a monochrome EPaperDisplay: MSB first, 1 = white. Falls back to a per-pixel copy that honors the mask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is the board the 1 bit GIF numbers come from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
mikeysklar
marked this pull request as ready for review
November 2, 2026 20:18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
Collaborator
Author
|
Replaced by #11740, opened from an adafruit branch so the three PRs stack. |
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.
What
GIFs can now play as 1-bit video on monochrome e-paper, through displayio.
Why
A stock e-paper update takes about 6 seconds, too slow for animation.
Part 3 of 3. Needs #11718 and #11719; their commits show here until they merge.
lag3_nf1_hq_autoclean_wipes.mp4
Feather RP2040 ThinkInk with the 4.2" panel, filmed on an earlier build of this stack. The script also ran a wipe every 4 s and a clean every 15 s.
30 s as
code.py, then Ctrl-C. Prompt 3.65 s later:Changes
bits_per_pixel=1, white when brightValueErrorResults
Feather RP2040 ThinkInk, 4.2" SSD1683, Ubuntu host, lag 3, 120-frame GIF at 20 ms. No camera.
Adafruit CircuitPython 11.0.0-alpha.2, built from this branch.
Test files
Test GIF:
teapot_1bit_hq.gif(400x300, 120 frames at 20 ms)Test driver:
ssd1683_lag.py(needs a lag build, see #11719)Full serial output from the snippet above
Behavior
ValueError, documentedScope
Enables this on Feather RP2040 ThinkInk only.
CIRCUITPY_EPAPERDISPLAY_LAG = 1CIRCUITPY_VIDEOCORE = 1CIRCUITPY_GIFIO_MAX_WIDTH = 800All 41 RP2350 boards also fit with all three on. The tightest, the WIZnet Pico 2 boards, keep 39 KB.
Panel safety
Video uses the fast updates from #11719, so its warning applies here: updates run far past panel makers' refresh limits, need a balanced waveform, and long-term wear on the panel is unknown.
AI assistance
Written with Claude Code.
🤖 Generated with Claude Code