Switches and buttons
Identify switch contacts and actuation types, then use pull-ups and debounce to make reliable digital inputs.

Switches and buttons
Momentary tactile pushbutton
Momentary normally open switch for short input events.
Arduino INPUT_PULLUP allows a switch to ground with no external pull-up in simple circuits.

Switches and buttons
Magnet-operated reed switch
Magnetically operated sealed contact commonly used for position sensing.
For a logic input, use a pull-up and measure continuity before wiring; check ratings for any load.

Switches and buttons · SparkFun 14330 example
Miniature slide switch
Mechanical switch with positions that stay selected until moved again.
Use continuity mode with the circuit unpowered to identify the contacts before connecting rails.