Happy little screens (with Elixir)2019-12-16
So me and Emilio Nyaray made Inky. We built on top of what was there from Nerves and Scenic and in the end we had the Inky series of eInk displays for Raspberry Pi devices working with Nerves through Elixir. Cool. That was a fun trip I've covered previously:
- Inky library release
- Getting started, guide
- The story of how it came together
- Me & Emilio spoke about it on Elixir Mix (podcast)
Recently Frank Hunleth, Justin Schneck and Luis Gabriel Roldan (@groldan) who've all been involved in some display-related shenanigans of different sorts move their repos into our organization that we've used for Inky. We call it pappersverk because that sounds like a pretentious swedish arthouse of some sort. And also it means "paper mill" in swedish which made sense for our eInk stuff. Anyway, they got their related display stuff in there. So that's neat.
Groldan has made a driver for the SSD1306 (small black and white OLED display) which was what brought him into the conversation overall. But what he did next really got me. Here is the post where he introduces Chisel to the public. Chisel is a library for drawing bitmap fonts entirely in Elixir.
He let me try it out early. I did this:
So what's great about that? For one thing, no anti-aliasing. So text is rendered as intended. The way we've worked with Scenic has made text anti-aliased which works terribly with minimal resolution or few color displays. Also, it means we can skip Scenic as a dependency for many simple applications. That's a nice option.
But what this really makes me want to do is work out a proper standard for handling simple displays in Elixir so that all these different displays we may end up implementing support for will share a standard interface. This would allow us to implement a non-OpenGL Scenic Driver for example, it could draw text with Chisel, it could draw primitives with a similar approach and suddenly we could do simple UI for any number of display types where OpenGL and existing Scenic Drivers might not make the most sense.
It's not all about Scenic of course. This would also mean that development tooling for working with these
displays, such as what we did with
inky_host_dev might be done in more reusable manner. We could get
away from writing everything for particular displays, even for the simpler displays.
We're not there now. We've only just started the discussion. But if you're interested, get involved, find us in the Elixir Slack under #nerves or #scenic. The work isn't particularly difficult but quite interesting and the people are friendly and enthusiastic.
Also, until then, try Chisel out. It will do a lot for small displays without much work. If you have the Inky, hooking that up is quite straight-forward.
If you have questions about this stuff, find me on the Elixir Lang Slack (in #nerves) or email me at email@example.com