upm
1.1.0
Sensor/Actuator repository for libmraa (v1.5.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 (int rs=8, int enable=9, int d0=4, int d1=5, int d2=6, int d3=7, int keypad=0) | |
~SAINSMARTKS () | |
float | getRawKeyValue () |
Public Member Functions inherited from Lcm1602 | |
Lcm1602 (int bus=0, int address=0x27, bool isExpander=true, uint8_t numColumns=16, uint8_t numRows=2) | |
Lcm1602 (int rs, int enable, int d0, int d1, int d2, int 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 (int rs, int enable, int d0, int d1, int d2, int 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 () |
Public Member Functions inherited from LCD | |
mraa::Result | write (int x, int y, std::string msg) |
std::string | name () |
Additional Inherited Members | |
Protected Member Functions inherited from Lcm1602 | |
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) |
Protected Attributes inherited from Lcm1602 | |
uint8_t | m_displayControl |
uint8_t | m_entryDisplayMode |
uint8_t | m_numColumns |
uint8_t | m_numRows |
mraa::I2c * | m_i2c_lcd_control |
mraa::Gpio * | m_gpioRS |
mraa::Gpio * | m_gpioEnable |
mraa::Gpio * | m_gpioD0 |
mraa::Gpio * | m_gpioD1 |
mraa::Gpio * | m_gpioD2 |
mraa::Gpio * | m_gpioD3 |
uint8_t | m_backlight |
int | m_lcd_control_address |
lcm1602_context | m_lcm1602 |
Protected Attributes inherited from LCD | |
std::string | m_name |
SAINSMARTKS | ( | int | rs = 8 , |
int | enable = 9 , |
||
int | d0 = 4 , |
||
int | d1 = 5 , |
||
int | d2 = 6 , |
||
int | d3 = 7 , |
||
int | 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.