B4R Question Matrix keypad scanner problem

Mostez

Well-Known Member
Licensed User
Longtime User
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!

B4X:
Do Until KeyValue = KEY_0
    Loop
    Log("a key is pressed")

thanks
 

Attachments

  • keypad.zip
    16.3 KB · Views: 240

Mostez

Well-Known Member
Licensed User
Longtime User
OK Erel, in this code I raise an event (KeyPressed) may I ask for simple example how to trap such event, just want to implement something like that;

print(yesNo)
if pressed yes
Sub1
else
Sub2
end if

Thanks so much
 
Upvote 0
Top