EM shutter almost working. Still a few things needed...

Thanks again,

I'll see if I can make sense of how to restructure it. So does that mean the delay function can still be used in the "else" code? If I understand correctly it will block everything else and finish what it has been told to do.

My response time would hopefully be 1-5 milliseconds at the most, as this is to detect and respond to small, fast insects flying through the focal area of a camera lens.

Using attiny85 with 8mhz internal clock

Thanks, I'll see how I go with restructuring...