Skip to content

maxhaesslein/amelie

Repository files navigation

Amélie v.3

Amélie is a selfie printer that prints photos on cheap thermal paper, perfect for parties or weddings. It is named after the 2001 movie by Jean-Pierre Jeunet.

Image of the thermal printer

See here for more pictures and details.

This is a personal project and may be a bit finicky to set up.

Parts

Installation

Use a fresh Raspberry Pi OS Lite 32-bit installation. Install required dependencies with:

sudo apt install python3-opencv python3-picamera2 xserver-xorg xinit

Then download or clone this repo, extract it into ~/amelie (this path is hardcoded at some places, if you want to use another path, change the code accordingly), then start it by calling the start file.

Starting over SSH

To allow starting over SSH, you may want to add this to your /etc/X11/Xwrapper.config:

allowed_users=anybody # was: console

then you can call the start file over SSH

Autostart

To autostart, copy the amelie.service file into ~/.config/systemd/user/amelie.service and then activate it with:

sudo systemctl daemon-reload
systemctl --user enable amelie.service
systemctl --user start amelie.service
journalctl --user -u amelie.service

Settings

This script uses the picamera2 library, so if you use anything other then the official Raspberry Pi camera you may need to change some things accordingly.

USB thumb drive, config options

You can mount a USB thumb drive at /mnt/usb0/ (or change this path in the amelie file). The script will automatically check, if this drive is mounted and if an amelie.txt file exists at this path. If it exists, it reads this file and overwrites the default options. See config-template/amelie.txt for an example config file. If you configure a backupDirectory, all images will be saved in this directory. pinR, pinG and pinB are the pins for the RGB led. pinButton is the pin to listen for the button press. pinShutdown is another button that you can use to power down the Raspberry Pi. You need to hold this button for a few seconds before the shutdown triggers.