Is there a preferred or best way to collect data from a KeyPad to compare with what is accepted?
Example, a correct number to gain entry could be 123456 (only an example)
I have this code as starters for a 4 digit number
I was pleased to see the other thread describing Put and Get, which would presumeably be the best way to store numbers
EDIT: Just found Put and Get not supported in 08M2 or 14M2 according to my v5 simulator, duh!
Example, a correct number to gain entry could be 123456 (only an example)
I have this code as starters for a 4 digit number
Code:
For b3=1 to 4
readadc B.2,b0
if b0<50 then goto gg
Select Case b0
Case>240:B1=12' hash
Case>190:B1=11' zero
Case >150:B1=10'star
Case >125:b1=9
Case >105:b1=8
Case >92:b1=7
Case >80:b1=6
Case >73:b1=5
Case >68:b1=4
Case >62:b1=3
Case >57:b1=2
Case >50:b1=1
End Select
' ???????????????
Next
Code:
b0 = 100
For b1 = 0 To 5
Put b1, b0 ; Scratchpad[b1] := b0
b0 = b0 + 1
Next
For b1 = 0 To 5
Get b1, b0 ; b0 := Scratchpad[b1]
SerTxd( "Scratchpad[", #b1, "] = ", #b0, CR, LF )
Next
Last edited: