I want to create a MIDI Controller with 40 buttons and 10 potentiometers, the Arduino Micro (MIDI Class compliant) only has 13 GPIO ports, I thought of using an I/O expander and creating a button matrix with 4 columns and each with 10 buttons (4 columns x 10 rows = 40 buttons). The program for the Arduino is one I got from a youtuber, the Arduino let's you choose how every GPIO pin behaves (OUTPUT, INPUT, INPUT_PULLUP, INPUT_PULLDOWN). The code is written so that all button inputs on the Arduino use the pullup resistor ( pinMode(pinwhatever, INPUT_PULLUP) ) because it won't work differently. Since the I/O Expander says on its documentation that is has weak input pullup resistor I came up with the schematic shown below, but it uses 80 diodes and the voltage drop from them can be quite big how can the circuit change and use pullup or pulldown resistors? because I've been confused a lot
Attachments
-
378.6 KB Views: 6
-
228.6 KB Views: 7