Wraps a line, starting deasserted. Nothing is driven until Switch.set.
The line the part is wired to.
How the part is wired.
Whether the part was last set on.
How the part is wired.
Hands the line back, for a test to read what was driven or a program to reuse it.
The line.
StaticactiveA switch whose part is asserted by a high level.
The line the part is wired to.
The switch.
StaticactiveA switch whose part is asserted by a low level, the wiring of most relay boards.
The line the part is wired to.
The switch.
A two-state output over any line, with its polarity said once: a relay, an LED, a solenoid valve, a buzzer.
set(true)asserts it, which drives the line low for an active-low part, so no call site inverts a level by hand.Example