Hacker News new | past | comments | ask | show | jobs | submit login
Running an eInk Display with Elixir, Scenic and Nerves (underjord.io)
218 points by lawik on July 7, 2019 | hide | past | favorite | 68 comments



Fellow Nerves enthusiast here. Having an easy-to-use (YMMV) eInk display library in Elixir makes a whole slew of useful lab/tinker equipment feasible! Shoutout to @lawik for taking the effort to port inky over. It's fairly tedious to work with all the SPI and image buffer tweaks.

eInk's have nice readability for "around the lab" type equipment. Having a nice Nerves compatible wrapper lowers that barrier of entry even more. Sure you can do it with Python and a RPi Zero and perhaps some Ansible scripts or PiBakery, but there's something great about being able to make a custom (e.g. < 50 MB) embedded Linux sd-card image with proper SSH network/credentialing, all in around as long as it takes to download a full Raspbian distro on a busy network... I am planning on building a custom weighing station for simple chemical titration next week and have a nice unused eInk display sitting around.


Oh, hey! I've seen you around :) And thanks. Though nyaray deserves plenty of the credit too.

Yeah, my firmware image weighs in at 20Mb for the sample_inky repo. I like Nerves a lot for all the sanity it provides for the process.


Where did you get a "nice unused eInk display" from? :) I've been meaning to tinker with one at some point, but haven't gotten hold of one yet.




Accidental shopping, happens all the time :)


I have a reMarkable Tablet and it is a really excellent hackable device. It's actually a full-powered Linux machine with an e-ink display [I think about 10"? Never measured...]

It works brilliantly for music scoring, though the downscaling by about 10% over standard A4 sizing takes a second to get used to.


Remarkable Tablet is an awesome device with a great, open ecosystem. I was able to "reverse" the API by tracing the ioctl calls made by xochitl (their main application on the device) and analyzing it with IDA + Ghidra. They also provide the source to their kernel modifications to clarify a few things.

It is also noteworthy that they are very friendly to open source development as shown by their CTO coming in and answering an issue created on the libremarkable repo. :)

Here is something I did in Rust: https://github.com/canselcik/libremarkable

Findings regarding the hardware/software stack: https://github.com/canselcik/libremarkable/wiki/Framebuffer-...

And here is a fork of plato e-reader that uses libremarkable to run on Remarkable: https://github.com/darvin/plato

Color palette demo: https://camo.githubusercontent.com/dfe0fa57b14dd8f2c452bfada...

Partial refresh support demo: https://gfycat.com/scholarlyshadyelk


I really want one, but they are so expensive... I'm having trouble considering pouring more than half of my monthly salary into such a device.

I honestly wouldn't mind if there was a second option, bulkier (maybe even with an of-the-shelf raspberry as a motherboard), maybe with a smaller screen, and less polish (no custom-made injection molds, maybe a case I 3D-print myself).

Actually, I went to the website again, and it is €500, down from what I remembered was €750 (though it looks like it was "only" €600). I might consider buying one, but for a fraction of the price I could have a nice android tablet with a stylus, support for external displays, etc.

I would appreciate the opportunity to try it first, but I don't think it's being sold in any retail stores, and I don't know anyone with one.


I recently got one and have used it every single day for a month, it is frightening how quickly it became part of my workflow.

One downside is I dig in extremely hard to the screen and the replacement nibs are on the pricey side, so one thing to consider if you are getting one - there is an extended up-keep cost if, like me, you can't help but dig into the screen a little.

For me the reMarkable feels like tech that came from the heavens, a digital piece of paper that I can carry around and hack on (it has an SSH interface!). Which is weird considering eInk isn't new. I really hope they can release a smaller, cheaper version to keep the company ticking over so they can release hardware updates to the larger models.


Can you say what all you do with it?


Sure;

1. Using the LiveShare feature to mirror it to the screen to show diagrams and drawings to my team mates, useful when designing a piece of code I am going to write.

2. Reading and annotating PDFs (which I send to my device using a command line util called rmapi).

3. General scribbles throughout the day.

4. Book notes which I write, then convert to text using the inbuilt OCR and email to myself.


Try looking on the Facebook group (if you can bear it!).

There are lots of people getting rid of theirs, normally in favour of an iPad. You can often find some for 350-400 euros.


It looks amazing, but it’s so expensive!


Those are interesting. I hadn't expected them to be very hackable. Just something with ads on Facebook so I sort of wrote them off. Would be happy to be wrong.


Is there a decent email/calendar client for it?


It runs linux so you could in theory run mutt or something like that to get emails in when your on WiFi.

I've found with most of the homebrew-y stuff you need to create a launcher that draws the application to the screen of the reMarkable, by default its running a program called xochitl which handles the user interface, file system, etc.

So to sum up, doable but not done...yet!


Neither I am aware of.


I've wanted a dual eink display for piano sheet music for a while, but it seems that the only ones on the market are $2-5K+. I might try to dink around with a raspberry pi and a few eink displays to see how hard it would be to make a budget one.


The 2x 13" screen eink tablets for music are about $1500. You can also use a single screen 13" eink tablet and a footpad for turning pages, for about $500-600. They all run Android so Bluetooth foot pedals for page turning work fine.

Smaller 7-10" eink display tablets are even cheaper


I have a gvido device, which you seem to be referencing here. If I could return it, I would have, but their return policy is extremely restrictive and basically amounts to no returns.

It's waaaayyyy to slow to truly function. It can take several seconds for it to process a page turn, and their official fix for it is to change so that it only turns one page at a time.

I make it work when I'm practicing, but I will not use it for a performance, or ensemble work. I recommend staying far away until they can turn out faster devices.


Is the majority of that cost the eink displays? $1500 seems super high considering a kindle is $100 (hard to tell if Amazon is subsidizing the cost of the display though)

In my mind, you should be able to buy a dual eink display for <$500


Yeah I think it's low volumes of 13.3" eink screens/tablets that drive the price up. The small ones are really cheap


If you want 13" I don't think Inky will do it. I imagine trying to follow sheet music on a 4.2" display might be a bit rough. But I wouldn't know, I can hardly parse it on proper paper.


What size do you need? The wHAT is bigger and should work great with this. I don't have one so I haven't been able to verify. Will probably end up getting one at some point.

Currently considering seeing how far I can push the Inky towards a decent refresh rate. It is incredibly slow with color, but a nice device all the same.


Well it would be for sheet music, so ideally it would be in the 6"+ range. The bigger the better. Really just depends on cost - I don't want to spend more than a couple hundred bucks (otherwise I would just buy the PadMu 2)

Could I get more info on the "wHAT"? I tried googling for it, but there are a ton of false positives (due to "wHAT" being the same word as "what").


I can see that. Inky what would get you there.

This thing. Not cheap. Slow refresh. But pretty neat. https://shop.pimoroni.com/products/inky-what


That's way too low resolution for displaying sheet music.


Did you mean “to small size” or really “too low resolution”? That screen is around 100dpi, so I find it a bit odd you say it’s too low resolution.


"Resolution" is often used informally to mean "pixel count".


Again, the display is around 100 pixels/inch. Definitely not “retina” (which is such a marketing sham word anyway) level graphics (at the normal distance for sheet music), but still enough for my eyes to read individual notes easily (pixel density wise anyway, 4ish inch screen not withstanding).


Well the pixel density would be usable… if the screen were larger.

It is insufficient to display a page of sheet music.


Hence my “to small size” comment. ;)



I recently purchased a Kindle to restart my interest in reading and of course the first thing I did was to figure out how to develop my own software for it.

It turns out that the Kindle runs an embedded version of Java without a GC. This seems to have stifled the development quite a bit, so it's really cool to see how Raspberry-Pi/Inky homebrew is becoming a thing.


There's software which can be side-loaded on Kindles (and Kobos etc.), e.g. Koreader, written in Lua: https://github.com/koreader/koreader


There is also plato.

Original repo: https://github.com/baskerville/plato

libremarkable fork: https://github.com/darvin/plato


I know of plato, but haven't used it before. Do you have experience using it? / are you able to compare it with koreader?


I haven't used it as my primary driver but tested releases of it on my Remarkable Tablet. As far as my experience went, it was pleasant and pretty feature complete, at least as an ePUB, DJVU and PDF document reader.


Ok, I installed it (it just sideloads like Koreader, so it doesn't 'overwrite' anything) to try it out. It worked fine overall, but:

1) It took a lot longer to load than Koreader (so much so that I thought the reader had frozen)

2) I couldn't figure out how to have it trim PDF whitespace as tightly as Koreader does, which is important for being able to reasonably read pdf files.

3) I added additional fonts into its font directory (and I noticed that some other fonts were already there), but for epubs I couldn't figure out how to change the font from Libertinus Serif.

4) It's not clear that it has all of the advanced font features regarding kerning & ligatures that Koreader has added. (I'm not sure what's enabled by default in terms of kerning/ligatures since I couldn't change to a font that I'm more familiar with.)

5) It generally seems to have fewer features than Koreader.

But:

6) Visually, the interface is cleaner-looking than Koreader's. And it's a simpler (and perhaps easier/more intuitive) interface than Koreader's.

So perhaps I'd recommend it for someone who wanted something more basic/easier, but at this point I'll stick with Koreader.


I've been looking for a project like this. Thanks!


There is a project to build an open source OS for the kindle: http://fread.ink


The B&N Nook devices are running Android and can be rooted to allow installing your own apps on them. They're a much more accessible eink platform than Kindle, IMHO.


They used to have a Java SDK, unfortunately it's not around anymore. I used to have a serviceable version of Monopoly with a "reasonable" AI. I'm really sad that there isn't a Kindle app ecosystem.


I've been wanting to play with Scenic and still haven't gotten around to it yet. Probably won't start with a Nerves project that requires buying this kind of hardware, though.


That's fair. You can do plenty with Scenic entirely without hardware. And you should, Scenic is great :)


> An Inky display from Pimoroni. We've tested the Red PHAT

I tested it too! It was actually really good as an NTP client clock attached to a Pi Wireless Zero. I had it update every minute, then every 15 minutes it would get the time from my Pi NTPD clock server and display the offset in red. Longevity was excellent: it did 763,200 updates in its lifetime.

The Pi actually died following an attempt at an update but the display seems to still be operational.


I use a Dasung Paperlike Pro to do work on occasionally. I love it. It was expensive but personally it was worth every penny. Nothing beats coding outdoors with natural light. Pretty much the only thing its good for is reading/writing, but that has its own benefits.

I had to customize colors in vim as well, since you lose all the colors when you use eink, but that's only a marginal drawback.


I really really want an e-ink laptop, exactly for this purpose. I absolutely love working outside, like on my patio or wherever. I've tried just about every shade over the years, but anything other than basically enclosing the space between your head and the screen gives you too much ambient light for these LED screens.


Yeah I get you, the human eye works logarithmically so we can see in very dark spaces, but that means the light necessary to see a computer screen is a fraction of what comes from daylight. People were not meant to breath hvac air inside an unaturally lit cubicle. Fresh air, natural light, and proper sleep cycles(up with the sun, down with the sun) I feel are my secret sources of power.


Interesting, looking at the indiegogo page... "Fast as LCD" - is that true?


I have the first gen, which is nowhere near as fast as LCD. But looking at their videos it looks like they got the framerate to work at a much faster speed than mine which was leagues of improvement over a kindle. However, I'm confident that there will still be some lag between input and what you see.

They wrote their own software so that the display isn't doing a hard refresh every time the display changes, the downside is there is some ghosting, which is what the hard refresh on kindles will remove.

I use keyboard shortcuts extensively to the point where I rarely use a mouse so I can work with the low framerate of the first gen. It even forced me to get better with using keyboard shortcuts and now I have little to no problems with it.


Thank you for the write-up! I've been looking for an excuse to dig deeper into Scenic, and the allure of combining that with eInk makes it sound even more fun. Ordering an Inky right away.


As an artist, what I would love is an eInk that could be trimmed and shaped (within reason). It won’t happen, of course - even the early promise of eInk as “bendable” has mostly been shelved.


Are there any mobile phones with eInk displays?

I've wanted a Lightphone2 [0] but it seems like it might be vapourware.

[0] https://www.indiegogo.com/projects/light-phone-2#/


The Kingrow does this: https://www.indiegogo.com/projects/kingrow-k1-the-healthy-ph...

It's still crowdfunding, but it seems they started mass production already and it will be for real.


This looks like almost exactly what I want! But they've only raised $78,000? How can that possibly be enough to design and mass-produce a new mobile phone?


You can get a Yotaphone 3 for $300 shipped from aliexpress, which is an Android phone with an OLED screen on one side, and an eInk screen on the other. The eInk screen is intended to be used with apps with custom support using a yota-specific SDK, but there are some hacks you can do to mirror everything over to the eInk screen, which works reasonably well.


I'm really looking for a device with only an e-ink screen, and the correspondingly long battery life & low distraction factor. Having two screens seems strictly worse than having either one or the other to me.


I’ve seen one produced by Motorola for the Indian market - it was segmented eInk, so very simple and low-power. I’d love to see them in the US and EU, they’re just the thing for someone who wants to carry around a durable, cheap, and non-distracting phone.


There's also this one that might exist in Japan https://www.engadget.com/2018/10/18/kyocera-releases-tiny-e-...


What’s the current state of eInk/ePaper? I remember reading a couple years ago that the industry was bogged down by patents. Wonder if costs have gone down.


From the user perspective (I am looking for a paperwhite gen 3 replacement) the price is more or less the same, and the technology haven't changed much either since 2015- display contrast is the same, and is not getting closer to a real black print on paper feeling, unless you crank up the backlight


Something about this article just rubs me the wrong way --- it feels like CV padding. So many buzzwords, so much complexity, so many layers of libraries just to write to a display. I didn't know what Nerves was, so clicked over to https://nerves-project.org/ and didn't learn all that much more --- the home page there looks to be more marketing wank than anything else (a lot of projects these days seem to have this affliction; they'll tell you all the great things you can do, but never answer the question of what it is.) What's more, and this isn't specific to this article but basically all e-ink products out there, those layers of complexity almost certainly are not letting you use the display to its full potential; they only offer a dumb framebuffer interface.

That's particularly disadvantaging with eInk, because if you drive the display directly instead of using a pre-packaged controller, you can achieve effects like partial redraws without flickering, and even theoretically infinite levels of grayscale; here's a previous HN discussion of an article where someone did just that:

https://news.ycombinator.com/item?id=16140284

The ED060SC4 seems to be one of the best for this; you can drive them directly, they're reasonably large (800x600, 6") and cheap, and there's plenty of information on them.


Nerves is a framework for embeddable programming with Elixir.

Scenic is a new graphics framework for Elixir released over the last year.

The author is trying out new Elixir based technologies on an eInk display. And having fun with it.


Author here. Sorry to hear that that's your take-away. I can see how it feels framework-loaded. But making a library that works with Scenic (UI framework) and Nerves (embedded runtime and platform, alternative to Raspbian for the Pi) is pretty normal for the Elixir community and ecosystem. They go together largely like the LAMP-stack used to.

This post was not particularly about those frameworks but rather about supporting the release of a library me and a friend just put out there. I don't expect that library to have any real business use for me. I tried to cover the full range of what I've intended for people to do with the base library and the extras we created.

Me and a guy I met in the Elixir Slack put in the work to port the Inky library to Elixir from Python. Mostly because I wanted to be able to use it with Nerves and he got involved to scratch some itches. The post works as a bit of extra documentation for people to get started. I want it to be out there so when wants to know if Inky works with Nerves they'll find guidance.

Anyway, the Inky display as a product is made to be driven by GPIO and SPI. From what I gather we could do a lot weird stuff to try and run it faster (tried some today, but no dice), partial updates, etc. Our library does basic pixel-pushing, nothing fancy, but no huge layering on top either. We kept the level of abstraction from the library we ported.

Scenic was a fairly logical choice for rendering more advanced things than straight pixels in my estimate. A minimal-dependency UI framework on top of OpenGL. It does add a few layers of abstraction and we end up working from a framebuffer since I couldn't be bothered to re-implement all the draw calls. The framework I'd say is the goto for embedded UI rendering in Elixir and Nerves.

I really like the Nerves platform. Embedded is still a hobby for me but the platform seems sound. I think Farmbot is a neat example. I think the Nerves site covers a fair bit of what it does and tries to get to the point. But it isn't the easiest thing to explain briefly either. An embedded runtime that uses the BEAM VM to try and provide better reliability. So then you need to go into what Erlang is and why the BEAM is a good idea.

I'd be interested in driving something a bit more directly but I'm also very new with most of the nitty gritty in hardware. And I think I'm largely done with eInk for a bit. Aside from maintaining the library.

I hope that clarifies my intentions. I'm not sure I care if it changes your mind about the post :)

To be quite clear, if I intend to pad my CV I'd be writing React posts, maybe some GraphQL, sprinkle some devops on there. No recruiter will be beating down my door because I know about Nerves and Scenic. Even Elixir is still early days. This was for fun. I'll be mercenary some other day.


To be blunt. It seems like you care more about feeling important through criticism that making sure that your criticism is valid.


Please don't cross into personal attack. That breaks the site guidelines and we ban accounts that do that. Instead, if you have the karma (which you do), you can downvote such comments, flag them if they break the guidelines, or email hn@ycombinator.com in egregious cases.

https://news.ycombinator.com/newsguidelines.html




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: