If you Arduino-based project has run out of I/O - even when using Mega or compatible boards, an option can be to control a second board from the first, and communicate between the two using wired or wireless communications. One example of wired communication is to use the I2C bus, and this process has been documented by the OxGadgets blog in a simple tutorial.
The I2C bus is an easy data bus that only requires two wires, and should be familiar to most Arduino users. The tutorial covers the hardware and sketch code required to send bytes of data between the two boards, and also extra hardware required to extend the physical distance of the bus over five metres or more. Using these methods you can have a reliable and faster method of board communication than cheaper wireless modules.