A simple shellscript to take a picture every X seconds or minutes using gphoto2 and it’s library
#!/bin/bash
sudo gphoto2 –capture-image-and-download –interval=60 –filename=%y%m%d_%H%M%S_%n.jpg
This script runs endlessly, or until the camera is turned off. The camera takes a picture with your current setting (set it up manually and take a test shot!). It copies the picture to the Pi and deletes the file from the camera. The file is named like this: year_month_day_hour_minute_second_number.jpg like: 2013_06_11_21_15_12_1.jpg for the first picture, and so on.