A web interface to control a Raspberry Pi camera using Python Flask and picamera2.
- 🎥 Live video streaming
- 📷 Photo capture with adjustable settings
- ⏱️ Automatic capture sequences
- 🖼️ Photo gallery management
- 🎛️ Camera settings control (exposure, gain, brightness, etc.)
- 💾 Raspberry Pi OS Lite (64-bit)
- 🐍 Python 3.x
- 🌐 Web browser
-
💽 Flash Raspberry Pi OS with Raspberry Pi Imager
- Enable SSH during configuration
-
🔄 Update the system and expand the filesystem
ssh pi@raspberry_pi_ip_address
sudo raspi-config # Go to Advanced Options and choose Expand Filesystem
sudo apt update && sudo apt upgrade -y
sudo apt install python3-picamera2 python3-flask git -y- 📥 Clone the repository
git clone https://github.com/Guiss-Guiss/picamera.git
cd picamera- ⚙️ Create the systemd service file:
sudo nano /etc/systemd/system/picamera.service- 📝 Add the following content:
[Unit]
Description=PiCamera
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/picamera
Environment=PYTHONPATH=/home/pi/picamera
ExecStart=/usr/bin/python3 /home/pi/picamera/app.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target▶️ Enable and start the service:
sudo systemctl enable picamera.service
sudo systemctl start picamera.service- 🌐 Access the interface at
http://raspberry-pi-ip:5001 - 🎮 Use the controls to:
- 📸 Capture photos
- ⏱️ Configure automatic capture sequences
- 🎛️ Adjust camera settings
- 🖼️ View and manage captured photos
- 🔀 Fork the repository
- 🌿 Create a branch for your feature
- ✅ Commit your changes
- ⬆️ Push to the branch
- 📩 Create a Pull Request
This project is licensed under the MIT License.