Most often you connect C to the input pin and NO connected to GND (0V).
Use:
pinMode(inputPin, INPUT_PULLUP); //a LOW read on the pin means the switch is down.
Most often you connect C to the input pin and NO connected to GND (0V).
Use:
pinMode(inputPin, INPUT_PULLUP); //a LOW read on the pin means the switch is down.