InkFrame: a Wireless Photo Frame enabled by Pimoroni's Inky Impression and Raspberry Pi Zero 2W written in Python
This section presents the involved hardware and assembly instructions.
- Photo frame: LOMVIKEN 10x15 cm, IKEA [1]
- E-Ink display: Inky Impression 5.7", Pimoroni [2]
- Temperature and Humidity Sensor: DHT11 [3]
- Controller: RPI Zero 2 W, Raspberry Pi [4]
- MicroSD card: Any
- Follow the instructions provided by Pimoroni for connecting RPI Zero 2 W with display here [5].
- Remove the backside of the LOMVIKEN photo frame and cut it with a blade knife to ensure flat contact between the Inky Impression PCB and backside. Ensure the buttons are exposed.
- Connect the DHT11 sensor to the breakout header on the Inky Impression, using direct soldering or with flat cables. I used a small cut prototyping board with headers for a neat and modular fit in the narrow space between the frame and breakout. Connect pins in the following order: RPI-PIN#4 -> DHT11-DATA, RPI-3.3V -> DHT11-VCC and RPI-GND -> DHT11-GND.
- Prepare MicroSD card and insert into RPI, as instructed again here [5]. I'm using the Raspberry Pi OS 32-bit ported from Debian Bookworm. Ensure a WiFi connection will be established are and SSH is enabled.
- Power the system with the AC/DC adapter.
This section presents the instructions for how to install required software and how to configure the linux environment.
- Connect to the RPI via SSH. Instructions are given here [5] again.
- To the usual sudo apt update and sudo apt upgrade
- Install git: sudo apt install git
- Continue following the link above to install the Inky Impression required software.
- Clone this repository: git clone https://github.com/DigitalLivestock/inkframe.git
- Enter directory: cd inkframe
- Activate venv: source ~/.virtualenvs/pimoroni/bin/activate
- Install dependencies: python -m install -r requirements.txt
- Create folder for images: mkdir images
- Add images to folder from new terminal session on host PC: scp [image folder path on host PC]pi@[address]:[path to images on pi]
- Test inkframe: python main.py
- Wait for image to be written on display. Can take some time. Be patient.
- Systemd setup using the following instructions [6]. Instead of led-blink.service, use inkframe.service prepared in the inkframe-directory.
This section goes over the available functions of the system.
- Inkframe program reloads automatically after boot.
- Shuffles images in folder at every restart.
- New image every 30 min. Can be re-configured in src/config.ini
- Shows tempererature and humidity.
- Takes input from Inky Impression display buttons.
- Button A: Move to next image.
- Button B: Re-shuffle images.
- Button C: Reserved.
- Button D: Toggle temperature and humidity HUD visibility.
- [1] LOMVIKEN 10x15 cm, IKEA (https://www.ikea.com/se/sv/p/lomviken-ram-svart-80518206/)
- [2] Inky Impression 5.7", Pimoroni (https://shop.pimoroni.com/products/inky-impression-5-7?variant=32298701324371)
- [3] DHT11 (https://www.digikey.se/en/products/detail/adafruit-industries-llc/386/5356713)
- [4] RPI Zero 2 W, Raspberry Pi (https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/)
- [5] Getting started with inky impression (https://learn.pimoroni.com/article/getting-started-with-inky-impression)
- [6] How to start python script on boot (https://www.donskytech.com/raspberry-pi-how-to-start-python-script-on-boot/)