Slide Switches & Toggle Switches

A slide switch is a latching mechanical switch that contains a sliding slider knob to select between different electrical paths.

Sensors2 blocksMicroPythonC++
Slide Switch

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Pinout

Pinout of the Slide Switch, drawn as in the circuit editor. Select a label to see that pin in the table below.

Pins

Pins of this part
PinLabelType
AASignal in
COMCOMSignal in
BBSignal in

Properties

What you can change in the Property Inspector.

Properties of this part
PropertyRange or choicesDefault
PositionOn or offoff

A slide switch is a latching mechanical switch that contains a sliding slider knob to select between different electrical paths. Unlike momentary tactile buttons, a slide switch maintains its physical position and electrical state indefinitely until it is manually toggled back.


1. Schematic Symbol

Standard SPDT (Single Pole, Double Throw) switch symbol — the pole (COM) connects to one of two throw contacts (A or B), matching the component's real pin ids:

COM A B

2. SPDT (Single Pole Double Throw) Pin Map & Wiring

A standard slide switch contains three pins:

  • Pin 1 (Terminal A): Connected to ground (GND).
  • Pin 2 (Common - COM): Wired to the microcontroller's digital input GPIO pin.
  • Pin 3 (Terminal B): Connected to the positive voltage rail (VCC) or left floating if using the microcontroller's internal pull-up resistor.
  • Mechanical Operation:
    • Sliding the switch to the left internally connects Pin 2 (COM) to Pin 1. The input pin reads LOW (GND).
    • Sliding the switch to the right internally connects Pin 2 (COM) to Pin 3. The input pin reads HIGH (VCC).

3. Latching Switch Applications

Slide switches are ideal for:

  • System Power Switches: Disconnecting power supplies (like batteries) from regulators.
  • Configuration Modes: Toggling between operation profiles (e.g. switching a robot from "Manual" to "Autonomous" mode).
  • Binary Selectors: Setting digital variables on/off.

4. Component Properties (Property Inspector)

When you select a Slide Switch on the canvas, you can modify the following parameters in the Property Inspector panel:

  • Position (state): A toggle switch that controls the mechanical contact slide state in the simulator.
    • Default: false (Left position connecting COM to Terminal A)
    • Options: false (Left position / COM connected to Pin A), true (Right position / COM connected to Pin B)

5. Supported Blockly Blocks

Drawing the blocks…

6. Simulator Behavior

  • Interactive Toggling: In the OMS simulator, clicking the slide switch component during simulation toggles the slider handle left or right.
  • Continuous Flow: The SPICE engine immediately routes power from the COM pin to the bridged terminal, updating downstream logic pins without mechanical bounce noise.
Slide Switches & Toggle Switches — OMS Parts