Here is a
button node from
Take a look at button outputs. It has a
PRS pin, which is true whenever it is pressed. On each
UPD input pulse either of output pulses is emitted:
DONEif the reading is done, wherever the button is pressed or not
ERRif the reading of hardware port is impossible, for example, the incorrect port number defined in the
This is a standard idiom for side-effect nodes representing hardware or, for example, the Internet.
Let’s make the LED glow while the button is pressed.
PORTvalue of the
Hold the button to turn the LED on.
Place the already familiar node
led to switch the LED on or off on each press.