Skip to content

Button Switch

Mechanical button switch with 4 pins

Explaination Diagram of how button switch work

The Button Switch is a mechanical momentary switch with 4 pins:
L1, L2, R1, R2.

It is commonly used in embedded systems for user input, such as triggering GPIO interrupts or toggling logic levels.

  • L1 is always internally connected to R1
  • L2 is always internally connected to R2
  • The two pairs (L1–R1 and L2–R2) are electrically isolated from each other by default

When the button is pressed, the switch closes the circuit between the two pairs, effectively connecting all four pins together.

This allows current to flow between both sides of the switch and is typically used to pull a GPIO pin high or low when pressed.

When the button is released, the connection between the two pairs is opened again, returning the switch to its default isolated state.

The following example showing a button switch used to interrupt on click.