I am currently running the program via VNC and after startup I open the terminal and run the following code
cd home/documents/......
source venv/bin/activate
python new.py
as soon as i run this, the camera activates and the code to detect and announce what object is infront begins. So what do I need to do to run the same on start up? Also now every time I run the code, the whole raspberry just freezes and restarts, Is there any way to fix this?
I tried using the rc.local method and it doesnt work.
Regarding the system freezing, I thought it was a space issue and tried clearing the wastebin which was kind of full but didnt work
Try following the steps mentioned here: https://www.tomshardware.com/how-to/run-script-at-boot-raspberry-pi