Multiple Digital Outputs & Inputs

Looking for some hardware guidance.

I'm looking for a way for a CPU to support approximately 20 Relay outputs and 12 12v Digital Inputs. I would assume that there is SPI Digital input and Relay output cards out there that pcb's to do this. Looking to do this low cost solution. Only ones I seem to be able to find are all direct access and there is not enough IO on the CPU for the count. Also it would make wireing simpler.

Andy

You can easily increase the digital I/O pins with shift registers or I2C port expanders.

A Mega has enough I/O for your needs.