3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Time-Lapse Photography

Step 9Programming

Programming
Now is time to program the Arduino and test your setup.

Follows is my code:

/* Time-Lapse Camera Controller
  • ------------------
*
  • Hits a camera shutter at a set interval
  • for time-lapse photography. The rate of the
  • delay can be manipulated for unique effects.
*
*
*/

int camPin = 7; // sets the camera shutter pin
int stupidvar = 30000; // sets the delay between pictures

void setup()
{
pinMode(camPin, OUTPUT); // defines pin as an output
}

void loop()
{
digitalWrite(camPin, HIGH); // presses the button
delay(5000); // waits
digitalWrite(camPin, LOW); // release the button
delay(stupidvar); // delay between pictures

// stupidvar = stupidvar + 1000 // increments delay by one second for unique effect.

}
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Dec 6, 2011. 10:45 AMspystealth1 says:
Wouldn't the relay just spit dangerous voltage back into the arduino's pins when it releases the switch? I think you might want to put a diode between the relay's pin or just use a transistor with it.
Nov 26, 2010. 9:45 AMRyutso says:
So how's it work? Turn the Arduino on, Turn the camera on and it just starts snapping pictures like mad?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2360
Followers
200
Author:randofo(Randy Sarafan loves you!)
I am the Technology Editor here at Instructables. I am also the author of the books 'Simple Bots,' and '62 Projects to Make with a Dead Computer'. Subscribing to me = fun and excitement!