I have basically lifted the code below from http://www.rev-ed.co.uk/docs/chi008.pdf and I am trying to scan a 4x4 keypad. In the "scan" section, only the last key_value routine seems to work.
For example, as is, only the key_value = 12 routine works. If I comment out the key_value =...