Create a Nerves Message Board with Uderzo #PiDay #raspberryPi @Raspberry_Pi
Via nerves.build: Putting visual output to the screen has not always been a strong suit for Nerves devices.
Previously the best option was to open a web browser on the device and connect it to a local web server. While this worked fine, and for some applications is still the best solution, for others it’s heavy as it can increase the build time, boot time, and RAM usage of your project. But thanks to some recent developments we now have two much more focused options, each with its own strengths. In this post I will take a look at the simple and most direct method of drawing to the screen, Uderzo.
Uderzo
Uderzo, created by Cees de Groot, is a lightweight framework for drawing OpenGL (nanoVG to be specific) commands to the screen via elixir. To accomplish this Uderzo includes a small nanoVG based drawing application which it will merge with C code you embed in your elixir app. Then you can call into this code just like any elixir code and let Uderzo, and its underlying technology clixir, manage the boundary between the two applications. Magic!
In this exercise I will use Nerves and Uderzo to create a configurable message display. All of the code used for this project is stored in the repository here. In case you run into any troubles check your code against what’s there.
The hardware I used for this project is the Adafruit 7” HDMI Backpack, the 5V 2.5A Switching Power Supply and an RPI0W processor.
The article goes into detail on the software and testing things out
With its lightning fast boot time, easy compilation and minimal config Uderzo makes a great choice when simple text display is what’s required. The other options may be better suited when lots of interaction with the user is called for, or when lots of visual content needs to be brought in from other sources. But for this use case Uderzo represents a fast, easy and efficient way to display information on a screen using Nerves.