Reading an Arduino's inputs on a Seperate Arduino

I'm trying to build a MIDI keyboard with a Pro Micro (USB connection allows MIDI) but there are not enough inputs on the Micro for all the buttons I'm using for the keys. I have spare Nanos that have about 20 inputs (I can never remember how many) that when used in conjunction to the about 20 inputs on the Micro would be enough for my purposes. Is there some way to use the Nanos inputs to trigger events on the Micro's code? Thank you so much for your help!

What is wrong with using a key matrix?

I don't have any diodes to make it so that I can press multiple keys at once. I'm still very new to Arduino programming, and I know the simplicity of just having a key mapped to its own input pin. I also just don't really know how to make one. I'm trying to make this keyboard just off of stuff I have with me now. I'm hoping it'll be a quick project.

A multiple processor system won't be a quick project...

How fast do you want to read the keys ?

Adding a Arduino board with its own sketch makes a project much more complex.
The common way is to use extra hardware, such as input shift registers (see my Wokwi project with 74HC165 for 32 inputs) or I/O chips via I2C (I2C I/O expander).

Have a look at the Teensy 4.1: https://www.pjrc.com/store/teensy41.html.
Is 55 digital inputs enough ?

Thanks for the ideas! I think the MCP23017 is exactly the kind of thing I was looking for. I'll order some to come over the weekend. Thanks again!

If you're ordering stuff, instead of using what you have on hand, why not just get the diodes and use a matrix?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.