UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

SAINSMARTKS Class

Module: i2clcd

The Sainsmart LCD Keypad Shield uses 6 digital outputs and 1 analog input (for the keypad). The outputs are used to drive an attached LCM1602 LCD controller. This driver should also be compatible with the similar LCD keypad shields from DFRobot and Sparkfun.
keypadlcd.jpg

Item Index

Methods

SAINSMARTKS

(
  • rs
  • enable
  • d0
  • d1
  • d2
  • d3
  • keypad
)
Number

SAINSMARTKS constructor
As this is a shield, you will not likely have any choice over the pins that are used. For this reason, we provide defaults for all of them b of course they can be changed if your device is different.

Parameters:

  • rs Number

    register select pin

  • enable Number

    enable pin

  • d0 Number

    data 0 pin

  • d1 Number

    data 1 pin

  • d2 Number

    data 2 pin

  • d3 Number

    data 3 pin

  • keypad Number

    analog pin of the keypad

Returns:

Number:

getRawKeyValue

() Number

returns the floating point representation of the key that is being pushed. Each key produces a different value between 0.0 and 1.0, and only one key can be read at a time.

Returns:

Number:

the floating point value representing a key