Quote:
Originally Posted by grosh
We will try Alan's "rising edge" program. We don't understand the logic in it, but I have seen the icons before.
|
The code Alan posted in that thread uses a feedback node to look at both the current value of the button and the last value of the button. The triangular gate is a NOT gate and inverts the true/false value coming out of the feedback node. The other gate is an AND gate which returns true if and only if both inputs are true.
So the code outputs true if and only if the button is pressed now and wasn't pressed the last time the code executed.