Go Down

Topic: How to assign multiple functions to one button for arduino 4*4 matrix keypad (Read 174 times) previous topic - next topic

chetangowda

I want to assign multiple functions to all the keys in 4x4 matrix keypad
For example if the button 1 is press and hold for more then 2 second it should print G,  for button 2 = M, and so on,
Else it should print assigned value
Please help
I am very new to programming
Thank you all in advance

dougp

There are many forum threads dealing with 'long press', you should find some guidance there.  Some libraries also include this functionality.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

marco_c

My MD_UISwitch library has examples for using different types of keys. Key matrix is one ofthem. If you are interested https://github.com/MajicDesigns/MD_UISwitch
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up