Quote Originally Posted by Kalind View Post
well, i was thinking that when i push "Button A" of the keyapd, the upper setpoint will be displayed, "Button B" = Lower limit, "Button C" = Backspace, "Button D" = OK , "Button *" = alarm on/off, "Button #" = Main screen
Code:
InterruptHandler:
@ READKEYPAD _MyVar
resume
'now your key reading is stored in MyVar
most 16 key keypads are laid out 123A 456B 789C *0#D, so 1=1 2=2 3=3 A=4 4=5 . . . .
You can use this as is or use a lookup routine to alias the actual port reading to what
you want, like so:
Code:
lookup MyVar,[0,"123A456B789C*0#D"],MyOtherVar
now your key information stored in myOtherVar will mirror your keypad.
so . . .
Code:
If myothervar = A then gosub Uppersetpoint
if MyOtherVar = b then gosub . . . .easy