Cam and Arduino Duemilanove project

If its fast enough, you might be able to use one of these(or similar)!

It allows you to read/write many pins using a few.