The goal of this chapter is to switch loads that a GPIO pin cannot drive on its own: motors, relays, high-brightness LEDs and solenoids. A GPIO pin can source or sink only a few milliamps, which is far too little for any of those, so we put a transistor between the pin and the load: a small signal on the transistor’s control terminal switches a much larger current through the load. We’ll work with the two kinds of transistor used for this, Bipolar Junction Transistors (BJTs) and Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs), and we’ll size the resistor that drives a BJT’s base from a 3.3 V pin.