Hi,
I am trying to make one High speed photography trigger using Arduino Nano. Following the below tutorial:
" Arduino High Speed Photography Trigger - Matt Richardson, Creative Technologist "
I am looking for code to trrigger only flash. I dont want the code to switch off the power and open the shutter.
Can anyone please help me with the code please.
I am looking for code to trrigger only flash.
You have code that does something. You need to post that code HERE, not expect us to access an inaccessible site.
Hi Paul,
Thanks for getting back. Following is the code I got from the link I provided earlier.
/* Audio camera trigger by Matt Richardson
This is a basic sound-detecting camera & flash trigger for Arduino.
Use a piezo element for the sensor (see http://www.arduino.cc/en/Tutorial/KnockSensor)
Use opto isolators (aka optocouplers) for the flash and camera triggers
Camera must be in BULB mode for shutter release to work
*/
#define BUTTON_PIN 5
#define CAM_TRIGGER_PIN 11
#define FLASH_TRIGGER_PIN 12
#define SENSOR_PIN 0
#define LED_PIN 10
#define STANDBY 0
#define ACTIVE 1
#define WORKLIGHT_RELAY 9
#define SENSOR_THRESHOLD 0
int mode = STANDBY;
// For best results, set flashDelayMS according to what type
// of shot you're doing. 0 seems best for balloon burst while
// 10 seems best for shattering glass. YMMV.
long flashDelayMS = 10;
void setup() {
pinMode(BUTTON_PIN, INPUT);
pinMode(CAM_TRIGGER_PIN, OUTPUT);
pinMode(FLASH_TRIGGER_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);
pinMode(WORKLIGHT_RELAY, OUTPUT);
digitalWrite(LED_PIN, HIGH);
digitalWrite(WORKLIGHT_RELAY, HIGH); //turn the lights on
}
void loop() {
if (digitalRead(BUTTON_PIN) == HIGH)
{
mode = ACTIVE;
digitalWrite(WORKLIGHT_RELAY, LOW); // turn the lights off
delay(2000); // to give time for light to go down and settle after button push
digitalWrite(LED_PIN, LOW); // show we're ready
digitalWrite(CAM_TRIGGER_PIN, HIGH); // open the camera shutter
}
if ((mode == ACTIVE) && (analogRead(SENSOR_PIN) > SENSOR_THRESHOLD)) //
{ //If we're in ACTIVE mode and we sense a pop:
delay(flashDelayMS);
digitalWrite(FLASH_TRIGGER_PIN, HIGH); // fire flash
delay(50);
digitalWrite(FLASH_TRIGGER_PIN, LOW);
digitalWrite(CAM_TRIGGER_PIN, LOW); // close camera shutter
mode = STANDBY;
digitalWrite(LED_PIN, HIGH);
digitalWrite(WORKLIGHT_RELAY, HIGH); // turn lights back on
}
}
This is my first project. I have gone through the rules of this forum. If I have broken them then kindly disregard my request.
If someone can help me to modify the code as per my requirement then I would really appreciate that.
The code is for ARDUINO NANO
- It is of a sound trigger for high speed photography
- At button push, power goes off in the room and camera shutter opens
- then the wait is for sound. at any noise the flash fires with the delay set.
- camera shutter get closed
- and room power comes back
my only requirement is
after push button trigger should activate and at sound it should fire the flash. I dont need the other two options. (turning off the power and opening the camera shutter) as I can do that manually.
I didnt try to modify the code by myself. will try it now.
I thought it should be very simple for experts out here and will make my work easier.
Thanks in advance.
If you do not want the shutter to be opened, don't open it. The code that does that is:
digitalWrite(CAM_TRIGGER_PIN, HIGH); // open the camera shutter
Obviously, you don't need to close the shutter, later, either.
Basically, anything that diddles with the CAM_TRIGGER_PIN is not needed.
The room lights are controlled by the WORKLIGHT_RELAY pin, so, if you don't need to do that, delete all the code that deals with that pin.
Thanks Paul.