What do you do if you do not have enough pins for your project? One option is to use a bigger Arduino-compatible board, but there is a cheap chip called a Shift Register or Serial to Parallel Converter that could help you out.
5 LED Knightrider Larson Scanner and Theme Tune
In this example we use the 74HC595 shift register. Not only has it got 8 output pins, but you can daisy-chain them for many more outputs.

