I have a rather ambitious project in mind. Lots of buttons, sensors, feedback.

If I run out of GPIO ports to attach stuff to my Arduino, what's next? Do you have to buy a separate Arduino to run the extra parts, and then link the two arduinos somehow?

Thanks for any direction you can give.

  • 1
    There is no one solution. It depends on what you are connecting.
    – Gerben
    Jan 30, 2017 at 8:40

1 Answer 1


Yes, it is one possible way, another are using some kind of multiplexing as input shift registers, Charlieplexing http://www.instructables.com/id/Charlieplexing-7-segment-displays/?ALLSTEPS, button matrix http://pcbheaven.com/wikipages/How_Key_Matrices_Works/ or i2C bus, which can connects up to 127 different i2c devices

  • 1
    You can use I2C or SPI port expanders (SPI ones are a bit faster but require more pins). Examples are the MCP23017 (I2C) or MCP23S17 (SPI). Or alternatively you can also add shift registers (chained outputs or inputs with just three pins). Good catch the button (or LED) matrix, and thanks for the Charlieplexing (I always used the usual multiplexing, but this is "smarter")
    – frarugi87
    Jan 30, 2017 at 8:39
  • I2C can't connect 127 different I2C devices - not if you wish to adhere to the standard. You can only officially use addresses 16 to 123, which is 107 devices. The other addresses are reserved for specific uses.
    – Majenko
    Jan 30, 2017 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.