Home  Contents

keyboard:setPins

Keyboard Core4 Lua Event System

SYNOPSIS

#include <lua/sidekick-pins.lh>
kbdhandle:setPins(rows, cols)

DESCRIPTION

The V4 Controller does not have a dedicated keypad matrix connector. To support a keypad, it can use the generic input/output pins instead.

This function takes two tables, rows and cols, which each contain a list of pins used for the keypad matrix. The row pins are used as outputs, the column pins are used as inputs.

NOTES

The V4½ controller has a dedicated keypad matrix connector. The setPins() command is not necessary and not supported.

EXAMPLE

To be able to connect a keypad to J8 (LEDs and Inputs), a possible configuration would be:

>  > 
kbdhandle:setPins( { SKIO_LED3, SKIO_LED2, SKIO_LED1, SKIO_LED0 }, { SKIO_IN3, SKIO_IN2, SKIO_IN1, SKIO_IN0 } )