Hi im struggling to get my code to scan correctly , it seems to but stuck on scanning row 4 , heres my code for decoding each key press
symbol key = b0
main:
debug
high 0
let key = 0
gosub check
low 0
high 1
let key = 3
gosub check
low 1
high 2
let key = 6
gosub check
low 2
high 3
let key = 9
gosub check
low 3
goto main
check:
if pin0 = 1 then gosub add1
if pin1 = 1 then gosub add2
if pin2 = 1 then gosub add3
return
add3: let key = key + 1
add2: let key = key + 1
add1: let key = key + 1
goto main
symbol key = b0
main:
debug
high 0
let key = 0
gosub check
low 0
high 1
let key = 3
gosub check
low 1
high 2
let key = 6
gosub check
low 2
high 3
let key = 9
gosub check
low 3
goto main
check:
if pin0 = 1 then gosub add1
if pin1 = 1 then gosub add2
if pin2 = 1 then gosub add3
return
add3: let key = key + 1
add2: let key = key + 1
add1: let key = key + 1
goto main