upm
0.3.2
Sensor/Actuator repository for libmraa (v0.7.2)
|
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.
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, int address, bool isExpander=true) | |
Lcm1602 (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3) | |
~Lcm1602 () | |
mraa_result_t | write (std::string msg) |
mraa_result_t | setCursor (int row, int column) |
mraa_result_t | clear () |
mraa_result_t | home () |
mraa_result_t | createChar (uint8_t charSlot, uint8_t charData[]) |
mraa_result_t | displayOn () |
mraa_result_t | displayOff () |
mraa_result_t | cursorOn () |
mraa_result_t | cursorOff () |
mraa_result_t | cursorBlinkOn () |
mraa_result_t | cursorBlinkOff () |
mraa_result_t | scrollDisplayLeft () |
mraa_result_t | scrollDisplayRight () |
mraa_result_t | entryLeftToRight () |
mraa_result_t | entryRightToLeft () |
mraa_result_t | autoscrollOn () |
mraa_result_t | autoscrollOff () |
![]() | |
mraa_result_t | write (int x, int y, std::string msg) |
std::string | name () |
Additional Inherited Members | |
![]() | |
mraa_result_t | send (uint8_t value, int mode) |
mraa_result_t | write4bits (uint8_t value) |
mraa_result_t | expandWrite (uint8_t value) |
mraa_result_t | pulseEnable (uint8_t value) |
virtual mraa_result_t | command (uint8_t cmd) |
virtual mraa_result_t | data (uint8_t data) |
![]() | |
uint8_t | m_displayControl |
uint8_t | m_entryDisplayMode |
int | m_lcd_control_address |
mraa::I2c * | m_i2c_lcd_control |
![]() | |
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.