Hello. I would like to ask if its possible to have more pins on arduino. Now i am using arduino Mega 2560 and i am still out of ping. I want to make enigma machine connected to typing machine so i want to use one SG90 servo for every latter plus numbers from 0 to 9. So its like 37 pins. so i need to have 37 input pins for every letter, number plus space. And i need 39 output pins again for letters, numbers, space bar and also dot and caps lock for like big latters. So please if you have some advices i would apriciate if you reply. Also sorry for my pretty poor english. I am not native english speaker.
Why not a matrix?
And again,why not a matrix?
Charlieplexing?
A good way to add GPIO pins is the I2C expander like the MCP23008 (8 pins) or MCP23017 (16 pins). 8 such devices can be added to the I2C bus giving 64 to 128 GPIO pins. Each pin has an internal pullup resistor that can be enabled and each pin has pin change interrupt capability.
So with this i can define every new pin separaty?
Are you referring to the matrix or the I2C expanders?
Like. Both. I am kinda new in arduino. Thats why i am here asking for help. Tbh i didnt know that this is possible
I am No expert
however from the little I know about MCU's
I believe one simple solution would be to buy a prototyping board with enough
digital pins, so that you can connect 1 button per letter/number
Where the Arduino boards don't have that many digital pins (not 37)
the Arduino IDE is compatible with a number of Teensy boards
which do have enough digital pins
I believe one of them even has 64 pins
4.1 has 55 digital pins
3.6 has 64 digital pins
3.5 has 64 digital pins
I also believe it is possible to connect two together
with one being the Master and the other a slave.
which would increase the amount even more
not sure how many you can connect together in total
With the MCP parts you can define each individual pin as input or output. And you can enable or disable the pullup on each pin. You read or write a byte at a time from the chips, but you can get or set the states of individual pins. You can enable or disable the interrupts for each input pin. Refer to the linked data sheets.
As to matrix and charlieplexing, time to fire up the search engine and do some reading.
Wow. Thx guys you helped me a lot. I didnt knew this is possible with arduino.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.