Follow along in the Reference Configuration
In this tutorial we discuss how to map a digital output to a variable and how to control the output state (on/off) by calling actions using a user event driven by a button press.
The output variable will reflect the state of the output, 0 for off and 1 for on. This can be used in programming activities to determine if the output has been turned on or off.
If you have trouble getting the output to work take a look at the output troubleshooting article linked here: Testing Digital Outputs.