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, 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 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.
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.