Conditional statement help

You can always create a function to do the "last input reading low to signal an output", and use it inside the conditional roughly same way you have there, no ?!
That way you can call it inside the conditional variable which will or not allow it to proceed...Makes sense ?!?