Cmd /
\ Cmd

Displaying a switch logical value

Type a question mark, a space and the name of the switch to display its current value.

Switches are named SW1...SW6:

  • SW1 corresponds to Arduino's pin D2
  • SW2 corresponds to Arduino's pin D3
  • SW3 corresponds to Arduino's pin D4
  • etc.

Switches values are 0 or 1:

  • 0=the switch is closed: the Nano input pin is connected to the ground
  • 1=the switch is opened: the Nano input pin is connected to +5V through the built-in pullup resistor

Use this command to check the state of a switch.

1>? SW1
SW1=1
1>
 
Return to index of Command mode
Page last modified on July 14, 2014, at 06:54 am
Powered by PmWiki