Virtual switch

Don't forget to add a current-limiting resistor to the input side.