
Originally Posted by
Kalind
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
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks