Pin names
Left terminal
Common terminal
Right terminal
| Handle position | Description |
|---|---|
| Left | Shorting pins 1 and 2 |
| Right | Shorting pins 3 and 2 |
Attributes
Initial position of the slide switch: "" for left, “1” for right
Set to “0” to disable bouncing
Bouncing
When you move a physical slide switch, the circuit opens and closes tens or hundreds of times. This phenomenon is called Bouncing. Wokwi simulates switch bouncing by default. You can disable the bouncing simulation for individual switches by setting their “bounce” attr to “0”:{ "bounce": "0" }
Simulator examples
- Slide Switch and LED - Using a slide switch to toggle an LED
- Slide Switch and 2 LEDs - A slide switch toggles between 2 LEDs
- Digital Pin Output Switching - A slide switch redirects the output of a digital pin to one of two LEDs