A simple project to turn a RaspberryPi and a camera module to a camera :)
I run it with a RaspberryPi Zero 2W Camera module is the HQ Camera module by Raspberry Pi and a PiSugar 2 to power everything
The script I wrote uses the input of 2 buttons, one to take a picture and one for recording videos. Press the Video button once to start a video and once again to end the recording. Note that you need a display with HDMI input! If the display gets its picture through the GPIO pins, then it won't be able to display the current video the camera is seeing...
I flashed Rapsberry Pi Os Lite 64-Bit to my Pi Zero 2W and used ssh to set everything up.
A Pi Zero 1W would in theory work but give you lower framerates and longer waiting time to take high resolution pictures.
In the camera.py script, you'll see that I already restricted the resolution of the camera module, because it would take me up to 5 seconds to take a full resolution image...
So a stronger Pi would be an advantage to reduce this timing.
Note You have to create two folders in your home directory for the script to work:
- Pictures
- Videos
Check the Spelling and pay attention that the first letter is capitalized! That's because in the python script want's to save pictures under /home/pi/Pictures and videos under /home/pi/Videos.
I used systemd to start the script upon system start. I added the start_camera.sh script too.
Here are some sample pictures to let you see the quality of the camera: