upm
1.0.0
Sensor/Actuator repository for libmraa (v1.1.1)
|
API for Sainsmart LCD Keypad Shield. More...
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.
Public Member Functions | |
SAINSMARTKS (uint8_t rs=8, uint8_t enable=9, uint8_t d0=4, uint8_t d1=5, uint8_t d2=6, uint8_t d3=7, uint8_t keypad=0) | |
~SAINSMARTKS () | |
float | getRawKeyValue () |
![]() | |
Lcm1602 (int bus=0, int address=0x27, bool isExpander=true, uint8_t numColumns=16, uint8_t numRows=2) | |
Lcm1602 (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t numColumns=16, uint8_t numRows=2) | |
~Lcm1602 () | |
mraa::Result | write (std::string msg) |
mraa::Result | setCursor (int row, int column) |
mraa::Result | clear () |
mraa::Result | home () |
mraa::Result | createChar (uint8_t charSlot, uint8_t charData[]) |
mraa::Result | displayOn () |
mraa::Result | displayOff () |
mraa::Result | cursorOn () |
mraa::Result | cursorOff () |
mraa::Result | cursorBlinkOn () |
mraa::Result | cursorBlinkOff () |
mraa::Result | backlightOn () |
mraa::Result | backlightOff () |
mraa::Result | scrollDisplayLeft () |
mraa::Result | scrollDisplayRight () |
mraa::Result | entryLeftToRight () |
mraa::Result | entryRightToLeft () |
mraa::Result | autoscrollOn () |
mraa::Result | autoscrollOff () |
Lcm1602 (int bus=0, int address=0x27, bool isExpander=true, uint8_t numColumns=16, uint8_t numRows=2) | |
Lcm1602 (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t numColumns=16, uint8_t numRows=2) | |
~Lcm1602 () | |
upm_result_t | write (std::string msg) |
upm_result_t | setCursor (int row, int column) |
upm_result_t | clear () |
upm_result_t | home () |
upm_result_t | createChar (uint8_t charSlot, lcm1602_custom_char_t charData) |
upm_result_t | displayOn () |
upm_result_t | displayOff () |
upm_result_t | cursorOn () |
upm_result_t | cursorOff () |
upm_result_t | cursorBlinkOn () |
upm_result_t | cursorBlinkOff () |
upm_result_t | backlightOn () |
upm_result_t | backlightOff () |
upm_result_t | scrollDisplayLeft () |
upm_result_t | scrollDisplayRight () |
upm_result_t | entryLeftToRight () |
upm_result_t | entryRightToLeft () |
upm_result_t | autoscrollOn () |
upm_result_t | autoscrollOff () |
![]() | |
mraa::Result | write (int x, int y, std::string msg) |
std::string | name () |
Additional Inherited Members | |
![]() | |
mraa::Result | send (uint8_t value, int mode) |
mraa::Result | write4bits (uint8_t value) |
mraa::Result | expandWrite (uint8_t value) |
mraa::Result | pulseEnable (uint8_t value) |
virtual mraa::Result | command (uint8_t cmd) |
virtual mraa::Result | data (uint8_t data) |
upm_result_t | command (uint8_t cmd) |
upm_result_t | data (uint8_t data) |
![]() | |
uint8_t | m_displayControl |
uint8_t | m_entryDisplayMode |
uint8_t | m_numColumns |
uint8_t | m_numRows |
uint8_t | m_backlight |
int | m_lcd_control_address |
mraa::I2c * | m_i2c_lcd_control |
lcm1602_context | m_lcm1602 |
![]() | |
std::string | m_name |
SAINSMARTKS | ( | uint8_t | rs = 8 , |
uint8_t | enable = 9 , |
||
uint8_t | d0 = 4 , |
||
uint8_t | d1 = 5 , |
||
uint8_t | d2 = 6 , |
||
uint8_t | d3 = 7 , |
||
uint8_t | keypad = 0 |
||
) |
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 – of course they can be changed if your device is different.
rs | register select pin |
enable | enable pin |
d0 | data 0 pin |
d1 | data 1 pin |
d2 | data 2 pin |
d3 | data 3 pin |
keypad | analog pin of the keypad |
~SAINSMARTKS | ( | ) |
SAINSMARTKS destructor
float getRawKeyValue | ( | ) |
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.