' Keypad
Controller Example Program with CuBase32M and 4x4 Keypad!
Const Device = CB280
Set Pad 0,1,4
Dim X As
Byte
Const Byte KEY_TABLE =
(0,0,1,2,3,4,0,0,0,0,5,_
6,7,8,0,0,0,0,9,10,11,_
12,0,0,0,0,13,14,15,16)
On Pad Gosub PAD_RTN
Do 'Infinite Loop
Loop
PAD_RTN:
X =
Getpad(1)
X = KEY_TABLE(X)
Debug "Pressed:
",Dec X,Cr
Return