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.
int ndx = 0;
uint8_t rgb[7][3] = {
{0xd1, 0x00, 0x00},
{0xff, 0x66, 0x22},
{0xff, 0xda, 0x21},
{0x33, 0xdd, 0x00},
{0x11, 0x33, 0xcc},
{0x22, 0x00, 0x66},
{0x33, 0x00, 0x44}};
while (shouldRun)
{
uint8_t r = rgb[ndx%7][0];
uint8_t g = rgb[ndx%7][1];
uint8_t b = rgb[ndx%7][2];
lcd.setColor(r, g, b);
lcd.
write(
"Hello World " + std::to_string(ndx));
printf("Hello World %d rgb: 0x%02x%02x%02x\n", ndx++, r, g, b);
sleep(1);
}
|
| 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, jhd1313m1_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 () |
|
| Jhd1313m1 (int bus, int lcdAddress=0x3E, int rgbAddress=0x62) |
|
| ~Jhd1313m1 () |
|
mraa::Result | scroll (bool direction) |
|
mraa::Result | setColor (uint8_t r, uint8_t g, uint8_t b) |
|
mraa::Result | backlightOn () |
|
mraa::Result | backlightOff () |
|
| 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 () |
|
mraa::Result | write (int x, int y, std::string msg) |
|
std::string | name () |
|