I have my code running using Pi-cam. While running if I press Ctrl-z, to stop the program .
However when I restart the code, it gives error that Pi-cam resource is not free.
How to run code so that whenever I run code, first its resource is freed.
I have my code running using Pi-cam. While running if I press Ctrl-z, to stop the program .
However when I restart the code, it gives error that Pi-cam resource is not free.
How to run code so that whenever I run code, first its resource is freed.
I've no idea about the camera and its software, but typically Ctrl-Z is _not_ what you want to do.
Ctrl-C is what you want to do.
Shabaz is right you could also just kill the process from another window. Also if you are writing this code you have written it in such away that it cleans up properly and releases resources when it recieves a signal
John
1. Will ctrl+c also free resource of camera?
2. If not, what command I should write in start or end of code, so that when it exits, it cleas camera resource.
Depends what you have written and in what you havent mentioned what you have writtenthe code in.
Also I've noticed that a lot of those bits of code written to support the Pi camera directly do tend to lock up the PI anyway.