User Tools

Site Tools

한국어

cubloc:keypad:index

Keypad

variable = Keypad( portBlock)

variable Variable to store results (Returns Byte, No String or Single)
portBlock Port block (0 to 15)

Use this command to read input from a matrix keypad. One port block can be used to read a 4 by 4 keypad input. The keypad rows should be connected to the lower 4 bits of the Port Block, and the keypad columns should be connected to upper 4 bits of the port block.

Pullup resistors (2.2K to 10K) should be connected to the lower 4 bits of the port block. A resistor should be connected even if a row is not being used. Please refer to the diagram below:

A = Keypad(0) ' Read the status of keypad connected to Port Block 0

If no keys are pressed, 255 will be returned. Otherwise, the pressed key’s scan code will be returned.

Go CUBLOC home

cubloc/keypad/index.txt · Last modified: 2016/04/14 11:07 (external edit)