Created
July 13, 2018 09:56
-
-
Save jubalh/2d209b7879a7508c35db3f7a6464be01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from picamera import PiCamera | |
from time import sleep | |
import time | |
import sys | |
from subprocess import call | |
path = '/home/pi/hedwig-pictures/' | |
datetime = time.strftime("%Y%m%d-%H%M%S") | |
filename = path + datetime + '.jpg' | |
cam = PiCamera() | |
cam.start_preview() | |
cam.capture(filename) | |
cam.stop_preview() | |
call(["scp", filename, "[email protected]:/srv/www/hedwig-content"]) | |
print 'http://hedwig.hogwarts.dumbledo.re/' + datetime + '.jpg' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment