How does this work ?

Hey guys,

I wanted to do this project:

http://www.karlander.net/projekt/arduino-flash-trigger.html

If I'm wright the trigger of this set up is the wire in front of the rifle. And when it's cut it will trigger.
But how does he meassure if the wire is broken or not ? I just don't get it even if I look at the source code.

Probably it's dead simple hehe

Cheers

void meassure(){
//wait for trigger1
while(!digitalRead(timer1pin) == LOW ){
continue;
}

This is the crux of it, it hangs around (by shortcutting the rest of the function) until timer1pin goes high before allowing the sketch to continue. The trigger wire holds the Pin Low by a connection to Gnd against the internal pullup enabled in setup which is broken by the pellet when it leaves the gun. The internal pullup then pulls the pin High and away it goes.......

Great ! Got it !

Thank you very much