Here is the code, which triggers the shutter every 6 seconds. Based on the “Blink” code that is included in the Arduino IDE, with the only modification being the blink time.
/*
Time Lapse, based on Blink.
Triggers camera's shutter every six seconds.
This example code is in the public domain.
*/
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // 0n, trigger the Shutter
delay(3000); // remain on for three seconds
digitalWrite(13, LOW); // Off
delay(3000); // wait for three seconds
}
Nikon Remote Controller ML-L3
Nikon Remote Controller ML-L3 circuit board, with the case removed. I soldered wires to the positive and negative battery terminals, marked in red.
Nikon Remote Controller ML-L3 circuit board, back side. The central zig zagging printed circuit is the circuit that will trigger the infrared LED. I closed the circuit by taping a wire across it, as illustrated by the red line.
The positive wire, from the remote is inserted into pin 13 of the Arduino (I used black for positive, though red would have been a more logical choice ). The negative wire is inserted into the GND pin. As the Arduino “Blinks” it supplies power to the remote, and triggers the shutter.
Power is supplied to the Arduino from a 9 volt battery.
Nikon D70′s infrared receiver.
Test: The remote device narcissistically photographs itself.
I added attributes to the cubes: .col1(int), .theCol_u(int), and .vel(float) to watch for collisions, “unique” collisions (see the tutorial), and the velocity of the cube, respectively.
Two expressions are created for each cube, each rigidBody. The first is created to watch the dynamic rigid body collisions, and the velocity of the rigid body.