time lapse dolly code problems

jkennedy_87:

  if ((buttonState = digitalRead(buttonPin)) == HIGH)

Are you sure this is what you wanna do?