Raspberry Pi zero to boot by choice
This project introduces a simple GPIO button-based boot selector that lets you choose between a timelapse camera and a Bluetooth shutter camera simply by holding a button during power-up. The launcher automatically starts the selected application, eliminating the need to modify .profile or other system files for every project change. It’s an elegant, low-cost solution that can be extended to launch many different Raspberry Pi applications from a single SD card.
Introduction: A wide range of projects have been successfully developed using the Raspberry Pi Zero platform, including a ChatGPT terminal, camera booth, language assistant, mobile hotspot-based web streaming system on VPN, speech interface modules, YouTube jukebox, timelapse photography system, and a Bluetooth-based shutter camera. Traditionally, enabling these applications to run at boot requires manual modification of system startup files such as .profile, which can be inconvenient when switching between different functionalities.
import RPi.GPIO as GPIO
import time
BTN1=17# timelapse
BTN2 = 27# bluetooth shutter
BTN3=22#optional/futureuse
# .profile file
…
# Auto start timelapse/shutter
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then echo "SSH session detected - skipping autostart"
sleep 5
#python3 /home/bera/timelapse_camera.py python /home/bera/launcher.py

Discussie (0 opmerking(en))