SWITCH i [TO] IN n/BB n

Command:

SWITCH i [TO] IN n/BB n

Command Syntax:

CONNECT SWITCH i [TO] IN n/BB n

Range:

 

Describe:

Connect an external switch to a digital input pin. The button task will monitor the state of the switch allowing reporting for the switch on, not on, and was on since last checked. The connected pin is set to a digital input state with its internal pulldown enabled. The other side of the switch is connected to a power supply (3.3v) pin (or 5v supply if using IN3 port). Switches share number space with Buttons.

CONNECT SWITCH 1 [TO] IN 1

CONNECT SWITCH 2 [TO] BB 5

Result:

Connect a switch object (similar to button, but connected to Vcc instead of Gnd when enabled.)

Type or
Addressable Component:

Sensor