ARO234 - capturing with external signal

UC-788 rev. B is my camera, bought from

I’m lost with the instructions that came with the camera and I am not able to capture frames to jpg files using the external signal.

  • using RPi 4 with the lates Bullseye.and edited the “config.txt” for the latest kernel drivers to be used.

  • The camera seems to work ok and I can capture one shot still images using " libcamera-still -t 10 -o test.jpg "

  • the external 1.8V triggering signal is good and stable (driven from LM358 voltage follower and 817 opto).

  • I can see the framerate reading in the preview frame title being the same determined by high/low triggering so the triggering happens and I can also see the trigger pulses in my oscilloscope.

Here is the relevant part of the code modified from example.

os.system(“libcamera-still -t 0 --shutter 2000 -brightness 0.1 &”)
os.system(“v4l2-ctl -d /dev/v4l-subdev0 -c trigger_mode=1 &”)

print(“Start Trigger! Press CTRL+C to exit”)

while 1:

    GPIO.output(PIN11, GPIO.LOW)
    if GPIO.input(PIN31)==0:
        picsCount = picsCount + 1

except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
os.system(“v4l2-ctl -d /dev/v4l-subdev0 -c trigger_mode=0 &”)
GPIO.cleanup() # cleanup all GPIO
print(“Done Cleanup”)

In the instructions it is only said to use “libcamera-still -t 0 --shutter 1000” and then start the external signal, without any pointing to how to save the captured frames to files.

I have tried many options in the above os.system(“libcamera-still -t 0 --shutter 2000 -brightness 0.1 &”) but can’t get any frames saved to files.

Please advice, don’t know what to try next.


You can refer to the code I wrote before, you need to use picamera2

All right, thank you!

PS. Do you happen to have the same trigger examples written in C++, I’m more used to that than Python?




Sorry, picamera2 is a simple development tool provided by Raspberry Pi. If you want to use C/C++, you need to program with libcamera source code, we don’t have related examples.

If you want to develop your own, you can refer to the project that relies on libcamera source code.

OK and thanks again.


Well, I got opencv4 installed and working on the RPi4 but I can’t make any sense of the which probably is what I’m looking for.

There is not a single line of comment explaining what that program does and how it proceeds say thru the threading for instance and no examples of how args are used starting for external triggering.

I was able to get a test picture by fooling around with the args and parameters but no consistency and working hours get wasted but no triggering with external pulse. Can you please explain very clearly what that code does, how that code should work and how to set it up for external triggering.

It is not too much to as that we get properly commented and explained code with working examples for these cameras. I really need proper examples for python as I am not that experienced with its finesses.

Thank you.