DPReview.com is closing April 10th - Find out more

A6500 High Speed Capture With Flash - Issue With Delayed Flash (Need Help W/Program)

Started May 13, 2019 | Discussions thread
Entropy512 Veteran Member • Posts: 6,016
Re: A6500 High Speed Capture With Flash - Issue With Delayed Flash (Need Help W/Program)

boblug wrote:

I would comment out the led lines. Not sure why they are needed.

Also move the digitalwrite(flash, low) before the loop and add a copy of this line before the end of the loop.

Move the digitalwrite(soundsensor, high) before the loop also

in the if statement comment out the first delay and change seconf delay to 50 milliseconds.

This should remove a little of the time delay and keep your sensor as close as possible.

I'm not sure exactly what the deal is with that "give flash time to settle down" delay is.

I'm also not entirely familiar with the Arduino environment/IDE - all of my work with Atmel AVR controllers has been via avr-gcc.

If I were doing this:

I'd choose an AVR that had analog comparator interrupts available - http://www.avr-tutorials.com/comparator/utilizing-avr-analog-comparator-interrupt-feature

This will let you immediately change the output pin state when the interrupt executes.

A "typical" trick I use with most AVR projects is to have a timer/counter intterupt configured to trigger periodically, often at 1 kHz.  This is used for less time-sensitive housekeeping - for example, set a variable inside your analog capture interrupt to indicate that a trigger event started.  In the timer/counter interrupt - count a certain number of ticks of said interrupt once the "event started" flag was set before unsetting the trigger output pin.

TBD how to handle the "lock out another flash for X seconds" situation - multiple possibilities here.

-- hide signature --

Context is key. If I have quoted someone else's post when replying, please do not reply to something I say without reading text that I have quoted, and understanding the reason the quote function exists.

 Entropy512's gear list:Entropy512's gear list
Sony a6000 Pentax K-5 Pentax K-01 Sony a6300 Canon EF 85mm F1.8 USM +5 more
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow