drivers icon indicating copy to clipboard operation
drivers copied to clipboard

epd2in66b: Waveshare 2.66inch E-Paper Display Module (B) for Raspberry Pi Pico

Open trichner opened this issue 10 months ago • 9 comments

A simple driver for the Waveshare 2.66in EPD for the Pico. Heavily inspired by the official python implementation and its magic timing.

See also: https://www.waveshare.com/Pico-ePaper-2.66-B.htm

Using machine package currently breaks the build. How should I go about removing the machine package from the unit tests?

Example looks like this: image

trichner avatar Apr 20 '24 15:04 trichner

In an optimal scenario, we would add an spi test capabilty similar to https://github.com/tinygo-org/drivers/blob/release/tester/i2c.go

In the meantime, using the drivers.SPI interface instead of machine.SPI can also help.

deadprogram avatar Apr 24 '24 05:04 deadprogram

Looks like it is missing the example? https://github.com/tinygo-org/drivers/actions/runs/8860923503/job/24332227160?pr=673#step:8:308

deadprogram avatar Apr 27 '24 16:04 deadprogram

Looks like it is missing the example? https://github.com/tinygo-org/drivers/actions/runs/8860923503/job/24332227160?pr=673#step:8:308

Too much copy paste, should be fixed. Sorry about that.

trichner avatar Apr 27 '24 17:04 trichner

Why is this driver specific to the pico? It looks like a regular driver to me that should work on any chip?

aykevl avatar Apr 28 '24 09:04 aykevl

Why is this driver specific to the pico? It looks like a regular driver to me that should work on any chip?

The driver 'should' already work with any other chip. The pins & SPI is all configurable. I only have the pico HAT to test currently though: https://www.waveshare.com/pico-epaper-2.66.htm

If this looks too specific, I can also remove the pico HAT specific defaults.

What would you prefer? Either works for me.

On a side note: I did not manage to figure out whether this is a specific waveshare driver chip or something more generic.

trichner avatar Apr 28 '24 11:04 trichner

If this looks too specific, I can also remove the pico HAT specific defaults.

It would be better to make them more generic.

To make life easier for devs, you could also add a file protected by build tag, with the specific values for the board you are using. That way the "default" case for your board "just works".

@trichner what do you think?

deadprogram avatar May 02 '24 17:05 deadprogram

If this looks too specific, I can also remove the pico HAT specific defaults.

It would be better to make them more generic.

To make life easier for devs, you could also add a file protected by build tag, with the specific values for the board you are using. That way the "default" case for your board "just works".

@trichner what do you think?

Sounds good! I gave it a try with build flags, was this what you had in mind?

trichner avatar May 03 '24 18:05 trichner

@deadprogram let me know if anything else is missing or needs change.

trichner avatar May 07 '24 17:05 trichner

Alright, all cleaned up!

trichner avatar May 18 '24 13:05 trichner

Anything left?

trichner avatar May 27 '24 20:05 trichner

Ping? :)

trichner avatar Jun 09 '24 10:06 trichner

Thanks for adding this @trichner now squash/merging.

deadprogram avatar Jun 10 '24 11:06 deadprogram