Hello,
This is not the best B4R code to scan matrix keypads, it is just a try, just wanted to share the idea with you, you may like to enhance and modify it as needed.
but i have a question here, I could not do this, 'wait for a key press', the loop blocks scanning timer. any ideas to do so? is there a way to direct program to wait for something to happen like pin state or key press in my case, then branch it again according to results!
thanks
This is not the best B4R code to scan matrix keypads, it is just a try, just wanted to share the idea with you, you may like to enhance and modify it as needed.
but i have a question here, I could not do this, 'wait for a key press', the loop blocks scanning timer. any ideas to do so? is there a way to direct program to wait for something to happen like pin state or key press in my case, then branch it again according to results!
B4X:
Do Until KeyValue = KEY_0
Loop
Log("a key is pressed")
thanks