OX05B1S External Trigger
External Trigger Signal
Pinout Definition
Name | Pin |
---|---|
trigger input | FSIN |
ground | GND |
Windows GUI
Access Camera Kit
Tip
The new version of OX05B1S Evaluation Kit supports external trigger function. If you need related application, please contact sales@arducam.com for the configuration file.
External Trigger Python code
This tutorial is based on Raspberry Pi. You can use any embedded device that supports signal transmission in practice. Please correctly connect the camera and trigger signal parts according to the hardware connection section.
import RPi.GPIO as GPIO
import time
import argparse
GPIO.setwarnings(False)
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(18,GPIO.OUT)
def main(framerate):
sleep_time = 1/framerate
sleep_time = round(sleep_time, 3) - 0.001
print("Start Trigger! Press CTRL+C to exit")
try:
while 1:
GPIO.output(18, GPIO.HIGH)
time.sleep(0.001)
GPIO.output(18, GPIO.LOW)
time.sleep(sleep_time)
except KeyboardInterrupt:
GPIO.cleanup()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Trigger")
parser.add_argument("-f", "--framerate", type=float, default=30, help="frame rate")
args = parser.parse_args()
main(args.framerate)
-f: frame rate of external trigger, in this example the trigger is 25 frames
python3 trigger.py -f 25
Demonstration
Due to the default exposure time is relatively long, if you want to get a higher frame rate, you need to reduce the exposure time. For example, if you need to trigger externally to 25 frames, you need to adjust the exposure time to about 4000 us.
Note
If the frame rate does not reach the desired frame rate, you can try to reduce the exposure time.