switches

mechanical ways to connect or select circuits. two axes: poles (how many circuits) and throws (positions).

typeexpands touse
spstsingle-pole single-throwon/off
spdtsingle-pole double-throwchoose a or b
dpdtdouble-pole double-throwflip two lines at once (e.g., polarity reverse)
mom.momentaryreturns when released

spdt contact map

no vs nc (what “normal” means)

labelexpands toat restwhen actuatedcommon uses
NO normally open open (off) closes (on) doorbell, keyboard keys, most pushbuttons
NC normally closed closed (on) opens (off) e-stop, tamper loops, hold-to-break safety
COM common the wiper. in an spdt, COM connects to NO or NC depending on lever position.
fact
“normal” = unpressed/unflipped; for relays, coil not energized. momentary = returns when released. toggle = stays where you leave it.
try this
wire an LED to NO and another to NC (with resistors). move the lever and watch which one lights.

debounce

mechanical contacts bounce for a few ms. in code, debounce 10–50 ms or hardware RC + schmitt trigger.