How a Transistor Switch Works The transistor in Figure is used as a switch to turn the LED on and off. For example, a square wave