Whilst you have quite a few outputs to play with on an Arduino board; sometimes there won’t be enough. One way to get around this is with the use of a shift register. This is a brilliant way to output eight pin’s worth of outputs – using just three pins. What’s more – it’s a fascinating insight into some elementary computer science…
I’m using the 74HC595 – purchased from the good folks at Oomlout.