Make sure that the camera is connected to the Raspberry Pi and verify it by opening a Terminal window and entering the rpicam-hello command. If you connected the camera after turning on the Raspberry Pi, it most likely needs to be restarted for the camera to start working.
- Update the Raspberry Pi and install Git
sudo apt update && sudo apt upgrade -y && sudo apt install git -y
- Change directory to the home directory and clone the GitHub repository
cd
git clone https://github.com/CEng-3/transfers.git
- After Git has cloned the repository, change into the directory
cd site
- Create a virtual environment
python3 -m venv venv
- Install OpenCV as a system package
sudo apt-get install -y python3-opencv
- Create a symbolic link
cd venv/lib/python3*/site-packages/
ln -s /usr/lib/python3/dist-packages/cv2.* .
- Run
python3 stream.py
You should clone this repository on the Raspberry Pi and then also clone the repository on your local machine. You should make changes on your local machine, commit them, and then test them on the Raspberry Pi.
- Change into the repository directory
cd site
- Use Git to update the version on the machine
git pull
Note: If you made changes on the Raspberry Pi, locally, you may need to run git reset --hard origin/main - doing so will discard your local changes, so ensure you've committed them from a seperate machine first.