Friday, May 10, 2013

Automatically taking photos of the sunrise over Mt. Rainier

I wish I had done this earlier and not when I have 2 more weeks left in the house before I move to a place that does not have a perfect view of Mt. Rainier from the master bedroom window.
I've connected this shutter release cable for the 5D to an opto-isolator chip which is then connected to one of the GPIO pins on my pcDuino. Whenever I want to wakeup the camera I set the GPIO pin high for 500ms to wakeup the camera. Then I use gphoto2 to capture the image.
The following script will be run at sunrise every morning.

/usr/local/bin/camera.sh
Taking photo 1 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2080.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2080.CR2 on the camera
Sleeping for 120 seconds
Taking photo 2 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2081.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2081.CR2 on the camera
Sleeping for 120 seconds
Taking photo 3 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2082.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2082.CR2 on the camera
Sleeping for 120 seconds
Taking photo 4 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2083.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2083.CR2 on the camera
Sleeping for 120 seconds
Taking photo 5 of 90
waking up camera
taking photo
New file is in location /store_00010001/DCIM/100EOS5D/3Q1A2084.CR2 on the camera
New file is in location /store_00020001/DCIM/100EOS5D/3Q1A2084.CR2 on the camera
Sleeping for 120 seconds