Was helping u/drchees1 on reddit to modify this so that it works using the raspberry pi PiCamera.
In the process I significantly cleaned up the code, so it should run more efficiently now, is easier to understand, and is more pythonic. Seemed only fair to contribute the improvements so that others can use them.
This pull request maintains the default behaviour of the code, but can also switch to using the PiCamera library if passed 'picamera' as a command-line argument (e.g. changing the modification of chrontab to */2 7-19 * * * python /home/pi/DIY-sky-imager/capture_image.py picamera).
Was helping u/drchees1 on reddit to modify this so that it works using the raspberry pi PiCamera.
In the process I significantly cleaned up the code, so it should run more efficiently now, is easier to understand, and is more pythonic. Seemed only fair to contribute the improvements so that others can use them.
This pull request maintains the default behaviour of the code, but can also switch to using the PiCamera library if passed 'picamera' as a command-line argument (e.g. changing the modification of
chrontab
to*/2 7-19 * * * python /home/pi/DIY-sky-imager/capture_image.py picamera
).