|
upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
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 () |
Public Member Functions inherited from Lcm1602 | |
| Lcm1602 (int bus, int address, bool isExpander=true, uint8_t numColumns=16, uint8_t numRows=4) | |
| 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=4) | |
| ~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 | scrollDisplayLeft () |
| mraa::Result | scrollDisplayRight () |
| mraa::Result | entryLeftToRight () |
| mraa::Result | entryRightToLeft () |
| mraa::Result | autoscrollOn () |
| mraa::Result | 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) |
Protected Attributes inherited from Lcm1602 | |
| uint8_t | m_displayControl |
| uint8_t | m_entryDisplayMode |
| uint8_t | m_numColumns |
| uint8_t | m_numRows |
| int | m_lcd_control_address |
| mraa::I2c * | m_i2c_lcd_control |
Protected Attributes inherited from LCD | |
| 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.


1.8.9.1