14 ms·
Running an eInk Display with Elixir, Scenic and Nerves
- jsjolen 7y agoI 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.
- jedimastert 7y agoThey 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.
- _emacsomancer_ 7y agoThere's software which can be side-loaded on Kindles (and Kobos etc.), e.g. Koreader, written in Lua: https://github.com/koreader/koreader https://github.com/koreader/koreader
- cmroanirgo 7y agoI've been looking for a project like this. Thanks!
- therein 7y agoThere is also plato. Original repo: https://github.com/baskerville/plato https://github.com/baskerville/plato libremarkable fork: https://github.com/darvin/plato https://github.com/darvin/plato
- _emacsomancer_ 7y agoI know of plato, but haven't used it before. Do you have experience using it? / are you able to compare it with koreader?
- therein 7y agoI 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.
- _emacsomancer_ 7y agoOk, 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.
- nanomonkey 7y agoThere is a project to build an open source OS for the kindle: http://fread.ink http://fread.ink
- ForHackernews 7y agoThe 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.
- umvi 7y agoI'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.
- lawik 7y agoWhat 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.
- umvi 7y agoWell 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").
- elemeno 7y agoShould be this, I think - https://thepihut.com/collections/raspberry-pi-screens/products/inky-what-epaper-eink-epd https://thepihut.com/collections/raspberry-pi-screens/produc...
- lawik 7y agoI 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 https://shop.pimoroni.com/products/inky-what
- CarVac 7y agoThat's way too low resolution for displaying sheet music.
- PunksATawnyFill 7y agoYeah, the super-low refresh rate and price of E-ink is a bummer.
- johnday 7y agoI 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.
- lawik 7y agoThose 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.
- therein 7y agoRemarkable 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 https://github.com/canselcik/libremarkable Findings regarding the hardware/software stack: https://github.com/canselcik/libremarkable/wiki/Framebuffer-Overview 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 https://github.com/darvin/plato Color palette demo: https://camo.githubusercontent.com/dfe0fa57b14dd8f2c452bfadab1b01d5fc51e6a9/68747470733a2f2f692e696d6775722e636f6d2f75647035534f4e2e6a7067 https://camo.githubusercontent.com/dfe0fa57b14dd8f2c452bfada... Partial refresh support demo: https://gfycat.com/scholarlyshadyelk https://gfycat.com/scholarlyshadyelk
- crispyporkbites 7y agoIt looks amazing, but it’s so expensive!
- deleted 7y ago[deleted]
- userbinator 7y agoSomething 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/ 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 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.
- brightball 7y agoNerves 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.
- lawik 7y agoAuthor 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.
- ForHackernews 7y agoAre 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#/ https://www.indiegogo.com/projects/light-phone-2#/
- i_am_nomad 7y agoI’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.
- ForHackernews 7y agoThere's also this one that might exist in Japan https://www.engadget.com/2018/10/18/kyocera-releases-tiny-e-paper-companion-phone-in-japan/ https://www.engadget.com/2018/10/18/kyocera-releases-tiny-e-...
- jmgao 7y agoYou 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.
- ForHackernews 7y agoI'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.
- anarcat 7y agoThe Kingrow does this: https://www.indiegogo.com/projects/kingrow-k1-the-healthy-phone-cares-your-eyes/x/16580847#/ 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.
- aiddun 7y agoWhat’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.
- 2rsf 7y agoFrom 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
- i_am_nomad 7y agoAs 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.
- AlchemistCamp 7y agoI'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.
- lawik 7y agoThat's fair. You can do plenty with Scenic entirely without hardware. And you should, Scenic is great :)
- elcritch 7y agoFellow 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.
- lawik 7y agoOh, 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.
- Fredej 7y agoWhere 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.
- chansiky 7y agoI 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.
- keyle 7y agoInteresting, looking at the indiegogo page... "Fast as LCD" - is that true?
- chansiky 7y agoI 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.
- rapind 7y agoI 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.
- chansiky 7y agoYeah 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.
- juhatl 7y agoThank 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.
- FerretFred 7y ago> 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.