ArduinoStudio

Switch

A latching toggle or slide switch that maintains its on/off state — unlike a momentary button.

Overview

A switch is a simple mechanical input that stays in its current position until manually toggled. Unlike a push button (which is momentary), a switch latches — flip it on, and it stays on. This makes it ideal for mode selection, enable/disable controls, and power toggles.

ArduinoStudio treats a switch as a digital input that fires open and close events when toggled.

Specifications

ParameterValue
TypeToggle / Slide / Rocker
Rating0.3A / 30VDC (typical)
Positions2 (ON/OFF)
LogicUses internal pullup — reads HIGH when open, LOW when closed

Wiring Guide

Switch TerminalArduino Pin
Terminal 1Any digital pin
Terminal 2GND

No external resistor is needed. ArduinoStudio enables the Arduino's internal pullup resistor automatically, so the pin reads HIGH when the switch is open and LOW when closed.

Usage in ArduinoStudio

Drag the Switch component onto the canvas and assign a digital pin. The switch emits two events:

  • close — fires when the switch is flipped to the ON position
  • open — fires when the switch is flipped to the OFF position

Use these events to trigger conditional logic — for example, enable a motor only when the switch is ON, or change LED modes based on switch state.

← Back to Components