ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
468 stars 346 forks source link

Modification of ArduCAM_Mini_2SD sketch question (external trigger) #544

Open ghannama opened 2 years ago

ghannama commented 2 years ago

Hi. I'm wondering if someone from the ArduCAM team can help me with a sketch modification question to the ArduCAM_Mini_2SD sketch . (I am somewhat of a novice to Arduino programming and the ArduCAM)

I currently have successfully set up my ArduCAM OV2640 to an Arduino Mega 2560 board and an SD Card Reader. I can successfully run the ArduCAM_Mini_2SD sketch, and capture images from the ArduCAM to the SD card continuously at ~5 second intervals (as the sketch is designed to )

I wish to modify this sketch so that it will take a digital input (Digital HIGH) signal from another Arduino and have that signal trigger a single image capture. It would then wait, until it receives another Digital high trigger signal to capture the next image...etc... In other words, rather than capturing images based on time, it will capture the image based on receiving the external trigger..

Also, I need to use a Digital input (ie Pin 4) on the Mega board to trigger the ArduCAM (not the trigger pin on the ArduCAM ).

Can someone advise me which lines of code I would incorporate into the ArduCAM_Mini_2SD sketch to do this, and where this would be inserted and which lines (if any) I would disable in the ArduCAM_Mini_2SD sketch? Thanks very much...Ameen (@ghannama)