/* ORBIT Photography Turntable Stepper Motor Control Camera Control Fall 2013 Geoff Tsai */ #include const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // for your motor // initialize the stepper library: Stepper myStepper(stepsPerRevolution, 0,1,3,4); // Pin 7 has is connected to the camera shutter int shutter = 7; // set the number of shots int shots = 120; // set the reduction used int wormgear = 30; // set the number of steps between each frame int nudge = wormgear*stepsPerRevolution/shots; void setup() { // initialize the pin as an output, default to HIGH (no shot) pinMode(shutter, OUTPUT); // set the speed at 20 rpm: myStepper.setSpeed(20); } void loop() { //take a shot by bringing the pin to ground digitalWrite(shutter, LOW); delay(200); // experimentally determined to trigger the camera digitalWrite(shutter, HIGH); delay(1500); // wait for flashes to recharge // step the motor into position for the next shot myStepper.step(nudge); delay(500); }