Menu

Functions

Glendon Klassen

[Home]

Functions

Assuming DFR_Key keypad;


DFR_Key() - Constructor

Initializes default refreshRate, keyPin, threshold, time, and key inputs.


keypad.setRate(int r)

Sets the key sample rate at once every 'r' milliseconds.
Default: 10ms


keypad.getKey()

Returns an integer value based on what key is currently pressed. Return values are as follows:

  • Wait: -1
  • No Key: 0
  • Select: 1
  • Left: 2
  • Up: 3
  • Down: 4
  • Right: 5

----------------

Upcoming Functions (v0.4) - February 2012

keypad.setARV(int btn, int arv)

Sets the analogue read value for 'btn' [getKey() code] to 'arv'.


keypad.setThreshold(int thr)

Sets the ARV threshold value to +/- 'thr'.

[Home]


Related

Wiki: Home

Auth0 Logo