Arduino Timelapse

Hi,

I am attempting to build a timelapse controller for a DSLR camera. This design will allow the interval between frames to be changed with two push buttons, as well as a start and cancel button to stop the procedure. The interval value can be changed but limited to two set parameters, for example between 1 second to 600 seconds. That value set then needs to be used by the program to set a pin (eg: pin 12) high and then low with a delay of 1 second between the event. The interval will be printed onto a 20x4 LCD along with the time elapsed, number of shots taken, humidity and temperature. The information will also need to be sent via serial and recorded as a timed log. Currently I am having problems finding information on this but I hope someone can help!

Thanks,

Dan

Break the problem down:
Look at blink without delay.
Look at the examples on how to drive an LCD
Look at the examples on how to read sensors and switches
Look at the examples on how to drive output devices.

Or post in Gigs and Collaboration, where you offer to hire someone to write the (simple) code for you.

Or go to cameraxe.com or triggertrap.com, both of which offer commercial versions of the trigger, but they do offer a shield for programming (and code for the shield).

Hi,

This is my code so far:

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int led = 12;
int led2 = 11;
int led3 = 10;
int led4 = 9;
int start = A0;
int cancel = A1;
int up = A2;
int down = A3;

void setup() {
  Serial.begin(9600);
  lcd.begin(20, 4);
  
  pinMode(led, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(start, INPUT);
  pinMode(cancel, INPUT);
  pinMode(up, INPUT);
  pinMode(down, INPUT);
  
  digitalWrite(led, HIGH);
  
  lcd.setCursor(3, 1);
  lcd.print("DSLR Timelapse");
  lcd.setCursor(5, 2);
  lcd.print("D. Skinner");
  delay(5000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Time Elapsed:");
  lcd.setCursor(0, 1);
  lcd.print("Current Temp:");
  lcd.setCursor(17, 1);
  lcd.print("C");
  lcd.setCursor(0, 2);
  lcd.print("Shots Taken:");    //prints amount of shots taken
  lcd.setCursor(0, 3);
  lcd.print("Interval:");    //Prints interval between shots
  lcd.setCursor(13, 3);
  lcd.print("s");
}

void loop(){    //timer for time elapsed 

  Serial.print("Time: ");
  time = millis();
  Serial.println(time);
  lcd.setCursor(14, 0);
  lcd.print(time);

  int sensorValue = analogRead(A4); 
  float voltage = sensorValue * (5.0 / 1023.0); 
  Serial.print("Temp:");
  Serial.println(voltage*100);
  lcd.setCursor(14, 1);
  lcd.print(voltage*100);
  
  digitalWrite(led2, HIGH);
  delay(1000);    

  digitalWrite(led2, LOW); 
  delay(1000);  

}
  int sensorValue = analogRead(A4); 
  float voltage = sensorValue * (5.0 / 1023.0); 
  Serial.print("Temp:");
  Serial.println(voltage*100);
  lcd.setCursor(14, 1);
  lcd.print(voltage*100);

What does this have to do with time lapse photography? I think you need to concentrate on the stuff dealing with the hardware involved in defining when to take pictures (presumably the up and down pins and the start and cancel pins). You can add useless crap later.