This projects uses Flask as a webserver that lets you see a low resolution live stream (640 x 480 px) while taking higher resolution images every minute (1640 x 1232 px). It also autoadjusts exposure for night photography as well, sacrificing fps.
It utilizes Python's Picamera2 library.
-Raspberry Pi Zero 2W / Raspberry Pi 4 (8GB).
-Raspberry Pi OS: Debian Bookworm 64 bit
-Python 3.11.2
-Picamera module v2 / v3
Install with:
git clone https://github.com/marcofariasmx/Raspberry-Picamera2-Surveillance.git
cd Raspberry-Picamera2-Surveillance
chmod +x install.sh
bash install.sh
This document provides instructions for setting up an automatic reboot on a Raspberry Pi. The configuration schedules the Raspberry Pi to reboot every three days at 6 AM.
- Access to the Raspberry Pi's terminal.
- Basic understanding of using the command line.
-
Open Terminal: Access the terminal on your Raspberry Pi.
-
Edit Root's Crontab: To schedule a reboot, edit the crontab file for the root user to ensure proper permissions.
Run the following command:
bashCopy code
sudo crontab -eThis opens the crontab file for the root user.
-
Add Cron Job: In the crontab file, add the line below to schedule the automatic reboot:
bashCopy code
0 6 */3 * * /sbin/reboot nowThis command sets the Raspberry Pi to reboot at 6:00 AM every three days.
0 6: Indicates 6:00 AM (0 minutes past the 6th hour).*/3 * *: Every third day of every month and every day of the week.
-
Save and Exit: Save the changes and exit the editor. If using
nano, pressCTRL+X, thenYto confirm, andEnterto save. -
Verify Cron Job: To check that your cron job is correctly set up, list all scheduled jobs:
bashCopy code
sudo crontab -lThis displays all cron jobs for the root user, including the new reboot schedule.
- Ensure this scheduled reboot aligns with your use case and does not disrupt critical services.
- To modify or remove this schedule, repeat steps 2 and 3, altering or commenting out the relevant line.
This format is commonly used in Markdown files (.md) and should be compatible with most documentation systems that support Markdown. You can copy this content directly into your README file.