Thursday, May 25, 2023

Hello, Inky: Hello World with the Inky 7.3

Creating a personal dashboard with the Inky Frame 7.3


I am working to create a personal e-ink dashboard with the Pimorioni Inky Frame 7.3, a 7.3" color e-ink programmable display with integrated Raspberry Pi Pico. As a first step in this process, I set out to learn about the board and create a basic Hello World program.

Limitations of the Inky Frame and Rapsberry Pi Pico


It's a microcontroller board.
When I ordered the Inky Frame, I didn't fully appreciate that the Pico is a microcontroller board as opposed to a fully fledged computer like a Raspberry Pi Model B. This means that instead of running a full operating system, it runs code directly on its two ARM Cortex-M0+ cores. With limited RAM and CPU power and without the operating system to manage networking, peripherals, and task scheduling, "simple" tasks like fetching data from APIs and loading images become more complicated. I will be writing programs in either MicroPython (for readability and ease of use) or in C++ (for performance). These will have limited build-in functionality compared to a full Python 3.x environment.

Pimoroni's graphics library is limited.
The Picographics module maintained by Pimoroni supports only basic rendering functionality. It can only render JPG images or 8x8px sprites from a specially loaded sprite sheet, and text can only be rendered as a bitmap or a jagged Hershey vector font. If I want to support more advanced rendering, I will need to get creative and build abstractions to overcome this limited feature set.

The refresh rate is slow.
The Inky Frame 7.3 has a slow refresh time of 40 seconds in full color. This rules out any applications that would refresh every minute, such as a wall clock program. Instead I will optimize for use cases that require less refreshing, such as displaying unread emails and news headlines.

Creating the Hello World

Fortunately, the 2MB of memory on the Pico are pre-flashed by Pimoroni with the Micropython interpreter and a set of demo programs. After running a few of them, I got to reading the example code and the picographics docs. While the examples feel a bit scrappy, I was able to begin extracting their functionality into a new module I call Display, which I plan to use as the base of my abstractions and utility functions while creating my programs for the Inky Frame.

You can view the module here (linked to the commit, to show it at this point in time).

I created a basic demo mode which uses only the bitmap text rendering feature to create an artistic repeated word display.

An example of the text-based demo mode.

Next steps: Network requests

For the next step in this project, I will test out the Pico's ability to make network requests, parse JSON response bodies, and display the results.



No comments:

Post a Comment