garage opener single wire with multiple outputs

The variables that you declare inside of setup() are in scope only in setup(). They do not exist outide of setup().