i’m trying to play around with a raspi zero 2 and an e-ink shield. I found some material regarding that, using inky.
Unfortunately it seems like inky is no longer being actively developed. It depends on a 0.1 of cuircuits_spi, while livebook itself depends on v1.x or v2.x.
Is there anything more current then inky known to learn how to speak to an e-ink display with nerves, or is there any known way to get this setup to run without landing in dependecy hell or using very old and outdated packages?
nerves_livebook on main [!] via 💧 v1.18.4 took 2,7s ➜ mix deps.get Resolving Hex dependencies… Resolution completed in 0.515s Because every version of inky depends on circuits_spi ~> 0.1 and your app depends on circuits_spi ~> 1.0 or ~> 2.0, no version of inky is allowed. So, because your app depends on inky ~> 1.0.1, version solving failed. ** (Mix) Hex dependency resolution failed
I can’t imagine i’m the only one who want’s to have an e-ink display on his nerves-device?!
Hey @riotmole, I think I’m probably the resident expert on e-ink and Nerves at the moment, so I’ll do my best to get you pointed in the right direction
Unfortunately, there’s a lot of variation between individual e-ink displays, as the driver chips don’t always support the same features/options. Could you send me some more info about which HAT you have, and I can see what I can do to help?
I suggest you start here. You can implement the EInk.Driver behavior in a custom driver module to support your hardware (if your hardware uses a SPI interface, which I guess it does, then you can use the EInk.Driver.SpiDriver helper module - see EInk.Driver.UC8179 for reference)
This is an example application of how you can use these libraries. It is the software that runs on the Goatmire name badges. You could likely tweak it to work on your rpi zero 2, if you wanted. Note that it is under active development, there’s a few PRs that make some pretty big changes that I’m going to get in this week.
A recommendations:
Try to find the datasheet for your e-ink display, as well as a reference implementation. This will help you understand which commands are sent to the display.
E-ink displays often require you to send over a waveform look up table (LUT). They are kinda black magic, they control the electrical charge applied to each pixel to get it to change color. You can mess with them, but normally the manufacturer of the display has a recommended lookup table. If you’re lucky though, the LUT will be programmed into the e-ink driver chip at the factory, and you won’t have to worry about it.
I’ll have a further look into it and i’ll see if i can find the datasheet.
Regarding the display itself, it’s an “waveshare 2.13inch E-Paper Display HAT V4 Version 250x122 Resolution 3.3V/5V Two-Color e-Ink Display epaper Screen for Raspberry Pi Zero/Zero W/Zero WH/3B/3B+/4B”
I can take a further look at this after work today, but here’s the datasheet:
Page 28 is what you want. It’s the list of commands to send, and in which order. The command definitions starts on page 15. Note that you will be using the 4-wire SPI interface, as described in section 6.4.2 on page 10.
I haven’t yet added a driver which supports a red channel, but it’s something I’d like to add support for in the library eventually. The rest should be pretty similar to the UC8179 driver already in the eink repo!