We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac98b02 commit 67b56b6Copy full SHA for 67b56b6
Jetson/Jetvariety/external_trigger/trigger.py
@@ -0,0 +1,25 @@
1
+# Arducam External trigger signal generator.
2
+# Copyright (C) 2022, Arducam.
3
+
4
+# External module imports
5
+import RPi.GPIO as GPIO
6
+import time
7
8
+# Pin Definitons:
9
+ledPin = 2 # Broadcom pin 2
10
+# Pin Setup:
11
+GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme
12
+GPIO.setup(ledPin, GPIO.OUT) # LED pin set as output
13
14
+# Initial state for LEDs:
15
+GPIO.output(ledPin, GPIO.LOW)
16
17
+print("Start Trigger! Press CTRL+C to exit")
18
+try:
19
+ while 1:
20
+ GPIO.output(ledPin, GPIO.HIGH)
21
+ time.sleep(0.001)
22
+ GPIO.output(ledPin, GPIO.LOW)
23
+ time.sleep(0.032)
24
+except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
25
+ GPIO.cleanup() # cleanup all GPIO
0 commit comments