Requirements

The requirements listed below are the ones used for the development of pibooth, but other configuration may work fine. All hardware buttons, lights and printer are optional, the application can be entirely controlled using a keyboard, a mouse or a touchscreen.

Warning

Using a Pi Camera, the preview is visible only on a screen connected to the HDMI or DSI connectors (the preview is an overlay managed at GPU low level). It also means that pibooth can not be started throught SSH tuneling. Even with X11 forwarding enabled (ssh -X ...) the preview will not be visible.

Hardware

Software

  • Raspberry Pi OS Buster with desktop

  • Python 3.7.3

  • libsdl2 2.0

  • libgphoto2 2.5.27

  • libcups 2.2.10

Install

Here is a brief description on how to set-up a Raspberry Pi to use this software.

If you intend to develop on pibooth, an editable/customizable version can be installed. Instead of doing step 8. of the below procedure, follow instructions here.

Manual procedure

  1. Download the Raspbian image and set-up an SD-card. You can follow these instructions.

  2. Insert the SD-card into the Raspberry Pi and fire it up. Use the raspi-config tool to configure your system (e.g., expand partition, change hostname, password, enable SSH, configure to boot into GUI, etc.).

    Hint

    Don’t forget to enable the camera in raspi-config.

  3. Upgrade all installed software:

    sudo apt-get update
    sudo apt-get full-upgrade
    
  4. Install SDL2 (and extras) which is required by pygame 2+:

    sudo apt-get install libsdl2-*
    
  5. Optionally install the last stable gPhoto2 version (required only for DSLR camera):

    wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/gphoto2-updater.sh
    wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/.env
    chmod +x gphoto2-updater.sh
    sudo ./gphoto2-updater.sh
    
  6. Optionally install CUPS to handle printers (more instructions to add a new printer can be found here ):

    sudo apt-get install cups libcups2-dev
    
  7. Optionally install OpenCV to improve images generation efficiency or if a Webcam is used:

    sudo apt-get install python3-opencv
    
  8. Install pibooth from the pypi repository:

    sudo pip3 install pibooth[dslr,printer]
    

    Hint

    If you don’t have gPhoto2 and/or CUPS installed (steps 5. and/ or 6. skipped), remove printer and/or dslr under the []

Automated procedure

Alternatively, you can use Ansible to install pibooth automatically. A playbook can be found here (thank you TiJof).

Circuit diagram

Here is the diagram for hardware connections. Please refer to the default configuration file. to know the default pins used (physical pin numbering).

Electronic sketch

An extra button can be added to start and shutdown properly the Raspberry Pi. Edit the file /boot/config.txt and set the line:

dtoverlay=gpio-shutdown

Then connect a push button between physical pin 5 and pin 6.