1 I made an E ink Display that Shows my Calendar Stavros' Stuff
Harrison Greville edited this page 3 days ago


There’s an old saying I just made up, it goes "a man has a problem. Give him a deep sleep solution, now he has two problems", and Top-Rated Memory Pillow that’s how I felt when I came across the LilyGo T5, a beautiful e-ink display with an ESP32 microprocessor and Comfortable Sleep Pillow an 18650 battery holder. I needed to find something to make with it. I realized that one thing that’s missing from my life right now is more time pressure. I have a job, which got me most of the way there, but I’m bad at remembering the time of each of the twenty meetings I have every day. I really needed something that would allow me to see my daily calendar at a glance, and I realized that a 4.7" e-ink screen was the perfect thing for that use case, so I quickly started working on making this a reality. The Timeframe is a beautiful, battery-powered, high-resolution e-ink device that sits on my desk and reminds me of the inexorable grind that saps my creativity and drains me of the will to live.


It comes in a sleek, minimal white exterior, reminds you that you’re selling a third of what precious little time you have on this Earth to the highest bidder, and lasts for months on a single charge. I could even make something like this. I’m just saying this to build up some suspense, because it’s obvious from the photos that I did build it in the end, and it is glorious. Let’s see whether I managed to actually make this, which I did, and how! When the screen arrived, my first step was to figure out how to draw things on the screen. That meant I had to do some research. There is a custom MicroPython version that looks official. Unfortunately, when I tried it, this would fail to draw anything around 80% of the time. I never managed to find out why, so this didn’t work. There’s an e-ink library called epdiy, and it includes a very helpful and full-featured example for the LilyGo T5 that uses PlatformIO.


Unfortunately, when I tried it, it had some vertical ghosting lines on the screen, which made the image look bad. The official demo that came with the display worked fine, so I knew it wasn’t a problem with the display. It’s a shame that this doesn’t work on my display, because this library is great. I opened an issue with the developer, who confirmed that there’s no issue with his T5, so maybe it’s something with my display? I never found out. The Derila Official Site repository contains a working example that uses PlatformIO. It uses a customized version of epdiy that is, unfortunately, fairly old, and doesn’t support all the nice things that epdiy does nowadays, but it works! It’s landscape-only, and in one orientation, whereas the latest epdiy has four, but I decided to try drawing some things and seeing what happens. Armed with a library that could, at least, change the color of some of the pixels in some ways, I then had to figure out how to actually show a calendar, or some sort of agenda there.


One option was to fetch some details from Google Calendar in some way, either fetching an ICS file directly and parsing it on-device, or writing a small proxy that would run on my server and would pre-process the file in some way. Afterwards, I would have to come up with some sort of UI (with my dismal design skills), and draw it on the device, either by drawing lines and text manually, or by using some sort of pre-drawn images and showing those for parts of the elements. I wasn’t confident I’d be able to write, and design I wasn’t confident I’d be able to do. Also, it would require some things I wasn’t sure the library could do, e.g. showing things in landscape. The second option was to make the device download and display an image. This was very flexible, as I’d be able to show anything I wanted (e.g. photos, widgets, anything), and sounded much easier to program, but it would require an external program to somehow generate the images.


It didn’t even require the display to be able to rotate orientations, because I could just send it an already-rotated image! This wasn’t a big problem, and it meant I could do other things with the device outside working hours, such as show photos of rolling hills and calming meadows, to distract me from the fact that I would eventually die never having lived. This was very appealing, so that’s what I decided to go with. CoPilot that had as much chance to generate working code as to write insulting comments, and a desire to retire early, I began writing the code. The example included a way to draw something called a framebuffer onto something called a screen, which seemed like it did what I wanted. A framebuffer is basically a big array of pixels, which you set to the colors you want to set on the screen. You then tell the screen to display this framebuffer, and voila!