Skip to content

Commit

Permalink
Merge pull request #16 from bnhwa/optarg
Browse files Browse the repository at this point in the history
Optional port specification for GPIO
  • Loading branch information
jakirkham committed Aug 13, 2015
2 parents 674ecd7 + fe9bb38 commit 79df941
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mouse/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ def main(*argv):
parser = argparse.ArgumentParser(
description="seconds before and after lever is pressed."
)
parser.add_argument(
"-p",
"--port",
type=int,
default=27,
help="GPIO port of trigger"
)
parser.add_argument(
"before",
type=int,
Expand All @@ -83,7 +90,7 @@ def main(*argv):
z = x + y

# sets up trigger event for the recordings, i.e., GPIO 27
trigger = Trigger()
trigger = Trigger(args.port)

with picamera.PiCamera(framerate=90) as camera:
try:
Expand Down

0 comments on commit 79df941

Please sign in to comment.