WIP: creating a photo frame for the Pimoroni Inky Frame display with a self-hosted webapp to allow photo upload directly from a device on the same Wi-Fi network.
This is my first project involving any hardware, so as a backend developer I had to put a webserver on that thing. That makes it usable offline and without juggling sd cards. Moreover, in the future, we can offload work on the user's browser by serving a javascript app, letting us do things a microcontroller might not be suitable for (e.g. image processing).
I love eink, and while the colors on the Inky frame are pretty limited, they can still make for a nice photo frame, plus it can be made so that it doesn't need constant energy, something that always turned me off (ehm) of digital frames.
The ultimate goal is to have a prototype for a DIY eink photo frame, that is offline operable (no saas or external services, although it will need a local network) and that uses energy only when changing picture (either on a schedule or on command) so it can be cordless with a long battery life.
Make sure you have/add a secrets.py file with the following variables:
WIFI_SSID = 'your_wifi_ssid'
WIFI_PASSWORD = 'your_wifi_password'
Run main.py to start the webapp.
- webserver initiates serving an index showing the current photo
- upload endpoint lets you upload a photo, and it displays the photo on the inkyframe after upload.
- some picture (even jpg) don't work still:
- figure out why some jpg don't work. 1 thing to try: remove progressive jpeg from file cfr: https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/picographics/README.md#jpeg-files
- update the display in the background, so we can respond from the webserver, even though the screen refresh takes a while
- add png support? maybe later, most usages would be for jpg
- process image in js before upload (resize, optimize for eink...)
- support multiple photos