How can I get input from undefined number of button Controller

127 Views Asked by At

If i want to get input from 20 to 30 buttons (Consider as a 30 Buttons of keypad), then what is the best approach to achieve it? Is these any keyboard available in market or I need to make it with my own talent?

Better if you can suggest with reference to Nodemcu,Esp8266, V3. Thank you

2

There are 2 best solutions below

1
On BEST ANSWER

There are cheap keypads available in the market which can be used with Arduino. They can take 4-5 pins to attach and then, you cannot utilize the pins for other use. Thus, you can use OnewireKeypad.h library. With this, you'll just require only one pin for data transfer, unlike the previous traditional way. You can go here for further info on how to do it.

The other way is to use an old PS2 PC keyboard which will take 4 wires and a library. Go here for further info about this.

These methods can all be implemented for NodeMCU, ESP8266, etc.

0
On

There are cheap fixed folio matrix keyboards with 16/20 keys per pad. You need 4-5 pins to attach, libraries can be found via library manager in ArduinIDE.
A nice hack is the use of an old PS2 PC keyboard which only needs four wires and a programm -see link for details.
You can easelyadapt for NodeMCU and if you get a cheap extra numeric keypad (normaly 30-32 keys) or a gamer extension board (up to appr. 50 keys) you can do all nice things you want