Best Answer Nevyn, 23 May 2015 - 05:34 PM
There are a few options, the most common one people have used here is to use a single 74HCT595 shift register. This will allow you to use three pins and have 8 outputs per chip. You need the HCT version as this will allow you to use 3.3V outputs to communicate with the chip. There's a fair amount of examples in the forums here for using these chips.
There are other chips such as the MCP23S17 which has 16 input/output pins. This one uses SPI but there are I2C versions out there.
Hope this helps,
Mark
Go to the full post