| 
    upm
    1.3.0
    
   Sensor/Actuator repository for libmraa (v1.7.0) 
   | 
 
API for the JHD1313M1 I2C controller for HD44780-based displays with an RGB backlight, such as a Grove RGB I2C LCD display. More...
JHD1313M1 has two I2C addreses: one belongs to a controller, very similar to the upm::Lcm1602 LCD driver, that controls the HD44780-based display, and the other controls only the backlight. This module was tested with the Seeed Grove LCD RGB Backlight v2.0 display that requires 5V to operate.
Public Member Functions | |
| Jhd1313m1 (int bus, int lcdAddress=0x3E, int rgbAddress=0x62) | |
| ~Jhd1313m1 () | |
| upm_result_t | write (std::string msg) | 
| upm_result_t | scroll (bool direction) | 
| upm_result_t | setColor (uint8_t r, uint8_t g, uint8_t b) | 
| upm_result_t | setCursor (int row, int column) | 
| upm_result_t | clear () | 
| upm_result_t | home () | 
| upm_result_t | createChar (uint8_t charSlot, std::vector< uint8_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 () | 
Protected Member Functions | |
| upm_result_t | command (uint8_t cmd) | 
| upm_result_t | data (uint8_t data) | 
Protected Attributes | |
| jhd1313m1_context | m_jhd1313m1 | 
| Jhd1313m1 | ( | int | bus, | 
| int | lcdAddress = 0x3E,  | 
        ||
| int | rgbAddress = 0x62  | 
        ||
| ) | 
| upm_result_t write | ( | std::string | msg | ) | 
Writes a string to the LCD
| msg | std::string to write to the display; note: only ASCII characters are supported | 

| upm_result_t scroll | ( | bool | direction | ) | 
Makes the LCD scroll text
| direction | True if scrolling to the right, false otherwise | 

| upm_result_t setColor | ( | uint8_t | r, | 
| uint8_t | g, | ||
| uint8_t | b | ||
| ) | 
Sets the color of the backlight Can be used to change the color even when the backlight is off
| r | 0-255 value for red | 
| g | 0-255 value for green | 
| b | 0-255 value for blue | 

| upm_result_t setCursor | ( | int | row, | 
| int | column | ||
| ) | 
Sets the cursor to specified coordinates
| row | Row to set the cursor to | 
| column | Column to set the cursor to | 

| upm_result_t clear | ( | ) | 
Clears the display of all characters

| upm_result_t home | ( | ) | 
Returns to the original coordinates (0,0)

| upm_result_t createChar | ( | uint8_t | charSlot, | 
| std::vector< uint8_t > | charData | ||
| ) | 
Create a custom character
| charSlot | the character slot to write, only 8 are available | 
| charData | A vector containing 8 bytes making up the character | 

| upm_result_t displayOn | ( | ) | 
Turn the display on

| upm_result_t displayOff | ( | ) | 
Turn the display off

| upm_result_t cursorOn | ( | ) | 
Turn the cursor on

| upm_result_t cursorOff | ( | ) | 
Turn the cursor off

| upm_result_t cursorBlinkOn | ( | ) | 
Turn cursor blink on

| upm_result_t cursorBlinkOff | ( | ) | 
Turn cursor blink off

| upm_result_t backlightOn | ( | ) | 
Turn backlight on

| upm_result_t backlightOff | ( | ) | 
Turn backlight off

| upm_result_t scrollDisplayLeft | ( | ) | 
Scroll the display left, without changing the character RAM

| upm_result_t scrollDisplayRight | ( | ) | 
Scroll the display right, without changing the character RAM

| upm_result_t entryLeftToRight | ( | ) | 
set the entry mode so that characters are added left to right

| upm_result_t entryRightToLeft | ( | ) | 
set the entry mode so that characters are added right to left

| upm_result_t autoscrollOn | ( | ) | 
Right justify text entered from the cursor

| upm_result_t autoscrollOff | ( | ) | 
Left justify text entered from the cursor


 1.8.6