How to make a Raspberry pi Action camera ?
Raspberry pi is one the cheapest single board computer available but what can you make a action camera out of it , lets see
This Tutorial is based on this Github Repository
Step 1 : Collect all the items required
- Raspberry Pi any model should work but make sure wifi is present (This was tested on zero w)
- Pi camera any version should work currently only the official pi camera modules are supported but soon support for web cam would be added (Tested with v1.3)
- Power Bank or any 5v Power supply

Step 2: Login into device using ssh or if having gui open terminal
Default username is ‘pi’ and password is ‘raspberry’
Step 3: Clone the RPcam repository to pi using git clone
git clone https://github.com/vineetkrgupta/RPcam

Step 3: Move to the newly created directory as RBcam and install all the requirements for the program using pip
pip3 install -r requirements.txt

After the installation is complete the recorded video would be saved in the /static/Videos folder and /static/Photos folder
Step 4 : Make script persistent
In order to make script persistent and run it everytime when the device is powered on we will use crontab ,to do that first we have to make an entry we can do that by the following command
sudo crontab -e
After that a confirmation popup might appear type Y to accept and then use arrow keys to move down the file opened and make the following entry in the last of the document
@reboot python3 /home/pi/RPcam/main.py

Final Step
After doing this , we have to restart our device , as usual our device will connect to the network and now we just can use it using any web browser by the following commands but before that we need to find the ip of the raspberry pi . which can be found using looking into the network .
<raspberry pi ip >:5000

Now in order to click picture use
<raspberry pi ip >:5000/TakePicture

In order to view the last Picture or video taken just use
<raspberry pi ip >:5000/last
Similarly various functions can be called such as
- /check (to check the storage left)
- /TakePicNight ( to take picture in night mode take about 1 min for a photo to capture)
- /StartRecord (start recording video)
- /StopRecord (stop recording video)
- /shutdown ( Shutdown the device )
- /last ( see the last media captured )
IMPORTANT INFORMATION
Inorder to make everything very easy and use it on go club eveything into a small package and an addition PIR sensor might be used to detect motion and capture images

Now by connecting raspberry pi to phone hotspot we can control the raspberry pi camera on the game
To avoid typing the whole url everytime in browser in order to capture photo or video we can use an app such as
https://play.google.com/store/apps/details?id=ch.rmy.android.http_shortcuts&hl=en_IN&gl=US
And then create shortcuts such as these

To Import these setting go to settings and select import and then import from url and use the following url
https://raw.githubusercontent.com/vineetkrgupta/RPcam/main/functions.json

After that manually change the ip of Every shortcut to the ip of your raspberry pi

And finally you can use your new raspberry pi Action camera
Happy experimenting :)
Email :- Vk779756@gmail.com
Instagram :- https://www.instagram.com/vineet.py/
linkedin :- https://www.linkedin.com/in/vineet-kumar-gupta/