FSavoy / DIY-sky-imager

Scripts for building your own sky imager
4 stars 3 forks source link

cleanup and allow picamera input #2

Open ES-Alexander opened 4 years ago

ES-Alexander commented 4 years ago

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).

ES-Alexander commented 4 years ago

Confirmed working correctly now.