When you consider how many GPIO pins have special functions, you might find that there aren’t always enough inputs to choose from. This can be an issue when many of the alternate functions are being used (SPI, I2C, UART, PWM, and so on). One way to cost effectively expand the number of Pi inputs is to attach one or more 74HC165 CMOS chips. These are available from digikey.com for as little as a dollar. Figure 9-1 illustrates an example of the 16-pin dual inline package (DIP) chip.
