- Notifications
You must be signed in to change notification settings - Fork0
A photobooth application for the Raspberry Pi and the Pi Camera Module
License
Jomy10/photobooth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A photobooth application for the Raspberry Pi and the Pi Camera Module.
Navigation
The application has been tested and works on the following configuration:
All three products come with the necesarry pieces to connect them together.
This application has not been tested on other hardware, but I am open to pullrequests adding support for them, or simply letting me know this applicationalso works on a different hardware configuration.
- Install a new copy ofRaspbery Pi OS Lite (64-bit) on your Raspberry Pi's SD-card
- For convenience, you can change the font size of the terminal using
sudo dpkg-reconfigure console-setup
- Enable auto-login on boot:
sudo raspi-config
- go toSystem Options
- go toBoot / Auto Login
- SelectConsole Auutologin
- Install the photobooth software; eitherbuild it from soure ordownload the latest binary
- Start photobooth at boot:add the following to the end of ~/.bashrc:
# Replace this with the path to your config file (or comment it out to# not apply any configuration)export PH_CONFIG=config.yaml# Replace this with the path to the photobooth executable# This line will start the applicationPhotobooth
- Reboot the pi:
reboot
Pre-compiled binaries can be found in thethe latest release.
You can also use this one-liner to download the latest release:
wget \"$( \ curl -s https://api.github.com/repos/jomy10/photobooth/releases/latest| jq -r'.assets[] | select(.name=="Photobooth") | .browser_download_url' \)" -o Photobooth&& chmod +x Photobooth
The command requiresjq
to parse json, which can be downloaded withsudo apt-get install jq
This chapter describes how to compile on the target Raspberry Pi.
# Install dependenciessudo apt-get update&& sudo apt-get upgradesudo apt-get install curlcurl -s https://archive.swiftlang.xyz/install.sh| sudo bashsudo apt-get install swiftlang libcamera-apps libcairo2-dev libjpeg-dev# Get the source codegit clone --recurse-submodules https://github.com/jomy10/photoboothcd photobooth# Compile the codeCONFIGURATION=release ./make.sh build# The application is now located at .build/release/Photobooth
ThePH_CONFIG
environment variable can be set to point to a config file. Anexample of this file:
# Logs will be written out to this fileloggingPath:"photobooth_log.txt"# Images will be saved in this folderimagePath:"images"# These will be displayed after an image has been takendoneSentences: -All done! -Curious to see the result?# Background color of the application# AARRGGBBbgColor:0xFF00FF00
You can add the following script to your home directory (in this example insave_log.sh
):
if [-f photobooth_log.txt ];thenif [-f photobooth_log_prev2.txt ];then rm photobooth_log_prev2.txtfiif [-f photobooth_log_prev.txt ];then mv photobooth_log_prev.txt photobooth_log_prev2.txtfi mv photobooth_log.txt photobooth_log_prev.txtfi
Make it executable:
chmod +x save_log.sh
Then add the following line to cron usingcrontab -e
:
@reboot /home/photobooth/save_log.sh
Photobooth: Photobooth software for touch screen devices
Copyright (C) 2024 Jonas Everaert
This program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.
You should have received a copy of the GNU General Public Licensealong with this program. If not, seehttps://www.gnu.org/licenses/.
Dependencies may be licensed differently:
- cairo_jpeg: GNU LGPLv3
- libdrm: MIT
- swift-graphics: MIT
- swift-cairo: MIT
- swift-utils: MIT
- Yams: MIT
About
A photobooth application for the Raspberry Pi and the Pi Camera Module