Photon and Raspberry Pi

I had a similar need. Check out my thread for more detail. @rickkas7 made some great libraries for the MCP23008 and MCP23017. You can also use the PCA9685 if you need PWM output. Both are I2c so two pins opens up nearly unlimited expansion potential.

PCF8574 IO Expander Board - Tutorial/example requested

I love Raspberry Pi, but I think it’s overkill for your need.

Edit: I made a breakout PCB for the MCP23008 and am working on one for the MCP23017. Let me know if you are interested and I’ll get my stuff uploaded to GitHub.