Here some code to get started. It has 2 constants the PHOTOINTERVAL and PULSELENGTH.
PHOTOINTERVAL is the time between snapshots.
PULSELENGTH is the time defining the length of the pulse for the camera.
You can test the sketch by connecting a LED to pin 7
unsigned long time = 0;
unsigned long lastpulse = 0;
unsigned long lastblink = 0;
#define PULSEPIN 7
#define PHOTOINTERVAL (30 * 60 * 1000UL) // 30 minutes in milliseconds
#define PULSELENGTH 100UL // pulse for camera, in milliseconds, must be shorter than PHOTOINTERVAL
// serial is not really needed but always handy while tinkering :)
Serial.println("Photo interval 0.1");
pinMode(13, OUTPUT); // on board led for "alive" blink
time = millis();
// time to start a new photo?
if (time - lastpulse > PHOTOINTERVAL)
lastpulse = time;
if ((time - lastpulse >= PULSELENGTH) && (digitalRead(PULSEPIN) == HIGH))
// blink onboard led to show sketch is still alive
if (time - lastblink > 1000) // fixed interval
lastblink = time;