riotmole

riotmole

Nerves Livebook with an e-ink screen

Howdy,

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?!

Thanks

Marked As Solved

gus

gus

Nerves Core Team

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 :slight_smile:

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 have a couple of helper libraries I developed while working on the Goatmire conference badge:

  • eink (GitHub)
    • 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)
  • dither (hex, GitHub)
    • Used for converting images to B/W with a dithering algorithm. Implements a few basic image processing capabilities
  • name_badge (GitHub)
    • 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.

Also Liked

gus

gus

Nerves Core Team

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!

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement