LCDKS Class
- ID: lcdks
- Name: LCD Keypad Shield
- Category: display
- Manufacturer: sainsmart dfrobot sparkfun
- Link: http://www.sainsmart.com/sainsmart-1602-lcd-keypad-shield-for-arduino-duemilanove-uno-mega2560-mega1280.html
- Link: http://www.dfrobot.com/index.php?route=product/product&product_id=51
- Link: https://www.sparkfun.com/products/13293
- Connection: gpio analog
The LCD Keypad Shield uses 7 digital outputs and 1 analog input (for the keypad). The outputs are used to drive an attached LCM1602 LCD controller. This driver should be compatible with the similar LCD keypad shields from Sainsmart, DFRobot and Sparkfun.
Item Index
Methods
LCDKS
-
rs
-
enable
-
d0
-
d1
-
d2
-
d3
-
keypad
-
backlight
LCDKS 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
NumberRegister select pin.
-
enable
NumberEnable pin.
-
d0
NumberData 0 pin.
-
d1
NumberData 1 pin.
-
d2
NumberData 2 pin.
-
d3
NumberData 3 pin.
-
keypad
NumberAnalog pin of the keypad.
-
backlight
NumberOptional GPIO backlight pin. Specify -1 if not in use or not supported on your device.
Returns:
write
-
msg
Writes a string to the LCD
Parameters:
-
msg
Stringstd::string to write to the display; note: only ASCII characters are supported
Returns:
Result of the operation
setCursor
-
row
-
column
Sets the cursor to specified coordinates
Parameters:
-
row
NumberRow to set the cursor to
-
column
NumberColumn to set the cursor to
Returns:
Result of the operation
clear
()
Upm_result_t
Clears the display of all characters
Returns:
Result of the operation
home
()
Upm_result_t
Returns to the original coordinates (0,0)
Returns:
Result of the operation
createChar
-
charSlot
-
charData
Create a custom character
Parameters:
-
charSlot
Numberthe character slot to write, only 8 are available
-
charData
Std::vector uint8_tA vector containing 8 bytes making up the character
Returns:
Result of operation
displayOn
()
Upm_result_t
Turn the display on
Returns:
Result of operation
displayOff
()
Upm_result_t
Turn the display off
Returns:
Result of operation
cursorOn
()
Upm_result_t
Turn the cursor on
Returns:
Result of operation
cursorOff
()
Upm_result_t
Turn the cursor off
Returns:
Result of operation
cursorBlinkOn
()
Upm_result_t
Turn cursor blink on
Returns:
Result of operation
cursorBlinkOff
()
Upm_result_t
Turn cursor blink off
Returns:
Result of operation
backlightOn
()
Upm_result_t
Turn backlight on
Returns:
Result of operation
backlightOff
()
Upm_result_t
Turn backlight off
Returns:
Result of operation
scrollDisplayLeft
()
Upm_result_t
Scroll the display left, without changing the character RAM
Returns:
Result of operation
scrollDisplayRight
()
Upm_result_t
Scroll the display right, without changing the character RAM
Returns:
Result of operation
entryLeftToRight
()
Upm_result_t
set the entry mode so that characters are added left to right
Returns:
Result of operation
entryRightToLeft
()
Upm_result_t
set the entry mode so that characters are added right to left
Returns:
Result of operation
autoscrollOn
()
Upm_result_t
Right justify text entered from the cursor
Returns:
Result of operation
autoscrollOff
()
Upm_result_t
Left justify text entered from the cursor
Returns:
Result of operation
getKeyValue
()
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:
The floating point value representing a key.
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:
The floating point value representing a key.