Skip to content

Commit

Permalink
Create trigger.py
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-ardu authored and ArduCAM committed Sep 15, 2022
1 parent ac98b02 commit 67b56b6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Jetson/Jetvariety/external_trigger/trigger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Arducam External trigger signal generator.
# Copyright (C) 2022, Arducam.

# External module imports
import RPi.GPIO as GPIO
import time

# Pin Definitons:
ledPin = 2 # Broadcom pin 2
# Pin Setup:
GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme
GPIO.setup(ledPin, GPIO.OUT) # LED pin set as output

# Initial state for LEDs:
GPIO.output(ledPin, GPIO.LOW)

print("Start Trigger! Press CTRL+C to exit")
try:
while 1:
GPIO.output(ledPin, GPIO.HIGH)
time.sleep(0.001)
GPIO.output(ledPin, GPIO.LOW)
time.sleep(0.032)
except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
GPIO.cleanup() # cleanup all GPIO

0 comments on commit 67b56b6

Please sign in to comment.