External hardware trigger on Arduino UNO R3 with Arducam OV5642 to save image to PC

Hi everyone, I’m trying to add an external hardware trigger to my setup. I’ve got an Arduino UNO R3 connected to an Arducam OV5642 5MP Plus camera, and I’m using the Arducam Host V2 app to get images onto my PC (the save path is configured inside the app). What I want is to trigger a capture with a hardware signal - like putting 5V on a specific pin - and have that image saved to the PC. Has anyone done something like this, or is there any example code out there?

Thanks for the details. Just so I understand correctly: you want the Arduino to wait for a 5V signal on a digital input pin, and when it sees that trigger, tell the OV5642 to capture a frame, which then gets saved through the Host V2 app? Could you confirm your exact hardware and software setup so I can look into this?

Right, that’s exactly it. Hardware: Arduino UNO R3 and Arducam OV5642 5MP Plus camera. On the software side I’m using the Arducam Host V2 application, and the file save path on the PC is configured there. I haven’t made any code attempts yet because I couldn’t find any example for the trigger part.

Okay, thanks. I need to be upfront here: we don’t currently have sample code or a reference implementation for using a hardware trigger input with the OV5642 5MP Plus. That specific use case isn’t something we have a ready-made example for, so I can’t hand you a working sketch.

I’m a bit confused then. I reached out to Arducam support directly and they said: “Sorry, for now, we do not have the same code or problem for the OV5642 5MP Plus camera to use hardware trigger input.” But the item description on welectron.com lists “support external hardware trigger” as a feature - that’s literally the reason I bought this camera. So does the module actually support an external hardware trigger or not?

Sorry for the confusion - I can see how that reply reads that way. Let me clarify: when we said we don’t have the “same code or problem”, we meant we don’t have sample code for the hardware trigger use case. That does NOT mean the camera module doesn’t support external hardware trigger. The hardware itself does support it, but we don’t ship any example code for it, so you’d need to write the trigger logic yourself according to your specific requirements.

Ah okay, that makes more sense. So the feature is there, just no example to copy. Can you at least point me in the right direction? Which pin on the module is the trigger input, and how would I wire the 5V signal into the Arduino so it initiates a capture and saves to the PC through the Host V2 app?

Right, exactly - the hardware supports an external trigger, but Arducam doesn’t provide sample code for it, so you’ll need to develop custom code for your specific requirements. As for the exact trigger input pin on the OV5642 module and the wiring, that’s something you’d want to confirm from the module datasheet and the Host V2 app’s communication protocol. The general direction is: write your own sketch that watches an Arduino input pin, and when it detects your 5V trigger, it sends the capture command to the camera so the image gets saved through the Host V2 app. I don’t have a working example to share for this, so I can’t give you the exact wiring or code, but that’s where I’d start.