Here’s what I did this weekend:
That’s an epaper-display picture frame. These screens are sometimes called e-ink or eink, they are passive screens and use very little power. I expect I’ll be able to run this picture frame on a single charge for a year.
It also has an ESP32 in it and will change the picture it shows every hour.
Since the Inkplate 6 this thing is based on is rather raw, I had some things to do before I had this nice little picture frame.
To make it easier for you and future-me, I’ll describe what I did here.
The big picture
This project consists of two parts: one epaper picture frame with an ESP32 microcontroller and software, and a server component for managing pictures.
Code for both is available on Gitlab https://gitlab.com/jspielmann/epd-pictureframe
The frame is configurable to show new pictures every so often, and it will use your wifi and your picture frame server to get new pictures. The pictures themselves are grouped into sequences on the server (so you can have more than one frame showing different pictures), and will randomly select an image. The server favours new images, so newly-uploaded ones will show up more often. It also pre-renders the entire data, so the frame itself has very little to do.
The picture frame
The frame is an Inkplate 6. You can also get these from other places, which might be simpler, cheaper and/or more convenient. For example, Mouser carries them in different versions: Inkplate 6 on Mouser.
I did not make any modifications to it, since it does what it should. I have one with the enclosure, but that’s not really worth it. Just get a cheap 13x18 or 15x20 picture frame and put it in there. Much nicer and cheaper too.
Since the Inkplate supports MicroPython, I used that. Flash your Inkplate with the newest IDF4-SPIRAM version of Micropython and you’re good to go. Set up the configuration options, copy the py files and restart the frame. It’ll automatically connect, set the correct time of day and fetch an image right away.
I had to dig a bit into the
inkplate.py sourcecode, but now the update is very quick since it only blits the downloaded file into the framebuffer directly.
That’s about all there is to see here. Since most processing happens in the server, that one is more interesting.
The server is a standard Django application that I cobbled together over the weekend. It has very little in the way of user management, or any kind of management really.
You need an account to create a sequence, but then each sequence is guarded by its 32-char sequence id. If you know the sequence id, you can edit it and see all its contents. So guard that like a password. This architecture is not super-secure, but it makes the image frame much simpler at reasonable safety levels.
So, once you have created a sequence (and set up a frame for it), you can upload images.
The images are cropped to the correct size automatically, so the end results might not look exactly like you uploaded them. If I get the time, I’ll add some cropping options to it. I’ll also accept pull requests. I don’t have a lot of time for side projects, so don’t hold your breath.
The server will also convert to grayscale and dither the image for you. Since our display only shows four levels of grayscale, that’s really really necessary. At the moment I use a simple Bayer dithering, but the library I’m using, hitherdither also offers other, much slower dithering variants. At the distances the frame is being looked at, it doesn’t make much of a difference, but the option is there.
And that’s it. There is really not much else to say. I tried to keep this side project to a minimum, and I succeeded. Now it’s simply a picture frame that shows different nice pictures every hour.
You should get one, too!