2 months ago

E-ink Calendar

Zonglin Li has proven e-ink displays are not just for reading by creating a smart calendar hub.

Some project ideas are simple yet effective, allowing makers to get creative with otherwise unused items to produce something practical or fun. In Zonglin Li’s case, inspiration struck when he was attempting to find a use for an e-ink screen he’d bought a long time ago without a clear project in mind. “I came across the box containing the screen and it reminded me that I should do something with it,” he says.

This article first appeared in The MagPi 80 and was written by David Crookes

At first, he considered turning it into a straightforward digital clock. “But I soon figured that it was impractical due to the long refresh time – every minute would require a full update, which is visually annoying,” he explains. He then began to think about the kinds of information which could tolerate a longer refresh period.

“The project was not really ambitious at the beginning and all I wanted initially was something that could show me the date and perhaps the weather,” says Zonglin. From there, however, he had the idea of incorporating his daily activities, seeing the existence of the Google Calendar API as an ideal opportunity.

Paper Pi

To start, he opted to use a Raspberry Pi because of its ability to run a full OS and its abundance of GPIOs: “Having a full OS meant that I could use high-level programming languages which saved a lot of time, especially when it came to Google OAuth and API integrations. The screen manufacturer also had nice documentation for Raspberry Pi, so it was easier to get started.”

He also quickly realised that the e-ink screen would be a perfect fit. “I believed it would give a feeling of a real paper calendar that happened to display up-to-date information,” he says. “The e-ink display also simplified the design, especially if you wanted to put the device in the bedroom, because it doesn’t need to be backlit to operate. Unlike using LCD, you don’t have to design the logic for adjusting the brightness either.”

Some e-ink screens support rapid partial update with multiple grey scales, so Zonglin is considering upgrading to add real-time notification mirroring using Pushbullet

Widget designs

Even so, much of the effort went into coding, with Zonglin coming up with ideas for widgets before figuring how best to structure them. He composed a date widget from a matrix of text widgets while the weather widget used Unicode text with a nice font for its icon and integrated with OpenWeatherMap API.

He also designed a widget for events using Google OAuth and Calendar API, adding an interactive guide to create a config file and parser. Finally, he sketched out each widget on paper, specifying the relative location of each component, and worked out the best-looking sizes before laying out their locations on the screen.

“I tried my best to avoid hard-coding the offset of each widget,” he reveals. “In this way, if I set the widgets to have a different size, all the components in the widget will be resized as well.”

Once in place, Zonglin considered the look of the overall project, using the GPIOs for a manual refresh button while also allowing for automatic hourly updates. This ensured the information does not become not too stale, especially for weather.

To add some extra polish, the screen was placed in a 7.5-inch photo frame and the electronics – the Raspberry Pi, 330 Ω resistor, and breadboard – were tucked around the back. The result is a good-looking smart calendar. “The code can also be ported with minimal effort should I get a screen of a different size in the future,” he says.