Trigger shutter release with Raspberry Pi
This file contains 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
""" | |
Control a camera shutter release on RTS pin of serial port | |
Author: Kelsey Jordahl | |
License: BSD | |
""" | |
import serial | |
import sys | |
import time | |
if len(sys.argv) > 1: | |
wait = float(sys.argv[1]) | |
else: | |
wait = 5.0 | |
s = serial.Serial('/dev/ttyUSB0') | |
s.setRTS(False) | |
while True: | |
print "snap!" | |
s.setRTS(True) | |
time.sleep(0.3) | |
s.setRTS(False) | |
time.sleep(wait) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment