Skip to content

feat: support epd_waveshare#127

Merged
orhun merged 16 commits intoratatui:mainfrom
tchmnn:epd-waveshare
Jan 23, 2026
Merged

feat: support epd_waveshare#127
orhun merged 16 commits intoratatui:mainfrom
tchmnn:epd-waveshare

Conversation

@tchmnn
Copy link
Copy Markdown
Contributor

@tchmnn tchmnn commented Oct 16, 2025

Hello there,

I tried to run mousefood on a waveshare display, since it was lacking support I tried my best to add it.
It works fine on my project using a Raspberry Pi Pico and a waveshare epd 2by9.

Kind regards

@orhun
Copy link
Copy Markdown
Member

orhun commented Oct 17, 2025

Heya!
Would be also nice to update the documentation about this 🧀 (e.g. feature flags, supported platforms, etc)

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 17, 2025

Heya! Would be also nice to update the documentation about this 🧀 (e.g. feature flags, supported platforms, etc)

Absolutely. I'll tackle that tonight.

On a related note I kind of want to change the implementation of From<TermColor>. To use Color::White for off and Color::Black for on. I kept my initial draft close to epd-weacts impl. But I keep switching foreground and background colors with ratatui so that the eink display is not all black with white text. What do you think?

EDIT: I also just saw that epd-waveshare implements it the other way around for From<BinaryColor> so I'll probably just re-use that impl.

@j-g00da
Copy link
Copy Markdown
Member

j-g00da commented Oct 17, 2025

Hi! I would prefer for Color::Black to always display as black and Color::White to display as white. Having to explicitly switch if one wants to display black-on-white may be unfortunate, but I think it's better this way as we are not creating weird behavior like white being displayed as black.

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 17, 2025

Hi! I would prefer for Color::Black to always display as black and Color::White to display as white. Having to explicitly switch if one wants to display black-on-white may be unfortunate, but I think it's better this way as we are not creating weird behavior like white being displayed as black.

Thanks for the feedback, I understand that. I updated the README. Let me know if I should add anything else.

Copy link
Copy Markdown
Member

@j-g00da j-g00da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Code looks good, but I don't really have hardware to test this.

If you can, it would be nice to add a minimal example project in /examples using your hardware.

Co-authored-by: Jagoda Estera Ślązak <128227338+j-g00da@users.noreply.github.com>
@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 17, 2025

Thanks! Code looks good, but I don't really have hardware to test this.

If you can, it would be nice to add a minimal example project in /examples using your hardware.

Yeah, so that is kinda complicated, since I had to make a couple of changes across multiple crates (mousefood, ratatui, kasuari) to get all of this working on the Raspberry Pi Pico.
I guess I'll just grab an esp32 (seems to have least friction right now) and replicate the example using the waveshare display, test it again an then add the example to this PR.
This would require this PR to be open a couple more days tho, if that's not a problem.

@j-g00da
Copy link
Copy Markdown
Member

j-g00da commented Oct 17, 2025

Not a problem :)

@j-g00da
Copy link
Copy Markdown
Member

j-g00da commented Oct 21, 2025

Btw. Do you have a picture of mousefood/ratatui running on waveshare EPD?

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 21, 2025

I can take one. Should I add it to the README then?

BTW I should be able to include the example tomorrow, the esp32 I ordered should arrive then.

@j-g00da
Copy link
Copy Markdown
Member

j-g00da commented Oct 21, 2025

Sounds great! Yeah it would be nice to include it in the README.md.

I'm also giving a talk about ratatui and mousefood this friday and would happily include it in the slideshow.

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 23, 2025

I tried to quickly throw together an example using an esp32c6, but I unfortunately run into that issue here.
To get a working example I'd either get my hands on another esp board or get the changes I made to get it running on the Pi Pico upstream first in the other crates.

So sorry that I am not able to provide you with another image for your presentation tomorrow.

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Oct 30, 2025

So I added an example using a xtensa board.

Copy link
Copy Markdown
Member

@j-g00da j-g00da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just few minor things :)

@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Nov 10, 2025

I applied your suggested changes

@tchmnn tchmnn closed this Jan 22, 2026
@orhun
Copy link
Copy Markdown
Member

orhun commented Jan 22, 2026

I'm reopening this as we will be going over the open issues/PRs soon (Mousefood is now a part of @ratatui!!!)

@orhun orhun reopened this Jan 22, 2026
Copy link
Copy Markdown
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@orhun orhun merged commit 04e6d44 into ratatui:main Jan 23, 2026
26 checks passed
@github-actions github-actions bot mentioned this pull request Jan 23, 2026
@tchmnn
Copy link
Copy Markdown
Contributor Author

tchmnn commented Jan 24, 2026

Thanks for the PR!

Thanks for taking the time on stream to brush it up. The example was generated using esp-generate, that's why the edition was set to 2021 I think and there was the extra bin file.

@orhun
Copy link
Copy Markdown
Member

orhun commented Jan 24, 2026

Ah, that explains it!

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

Successfully merging this pull request may close these issues.

3 participants