upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the JHD1313M1 I2C controller for HD44780-based displays with an RGB backlight, such as a Grove RGB I2C LCD display. More...

Detailed Description

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.

grovergblcd.jpg
upm_i2clcd.Jhd1313m1 lcd = new upm_i2clcd.Jhd1313m1(1, 0x3E, 0x62);
lcd.setCursor(0,0);
lcd.write("Hello World");
lcd.setCursor(1,2);
lcd.write("Hello World");
System.out.println("Sleeping for 5 seconds");
Thread.sleep(5000);
lcd.clear();

Public Member Functions

synchronized void delete ()
 
 Jhd1313m1 (int bus, int lcdAddress, int rgbAddress)
 
 Jhd1313m1 (int bus, int lcdAddress)
 
 Jhd1313m1 (int bus)
 
int scroll (boolean direction)
 
int setColor (short r, short g, short b)
 
- Public Member Functions inherited from Lcm1602
synchronized void delete ()
 
 Lcm1602 (int bus, int address, boolean isExpander, short numColumns, short numRows)
 
 Lcm1602 (int bus, int address, boolean isExpander, short numColumns)
 
 Lcm1602 (int bus, int address, boolean isExpander)
 
 Lcm1602 (int bus, int address)
 
 Lcm1602 (short rs, short enable, short d0, short d1, short d2, short d3, short numColumns, short numRows)
 
 Lcm1602 (short rs, short enable, short d0, short d1, short d2, short d3, short numColumns)
 
 Lcm1602 (short rs, short enable, short d0, short d1, short d2, short d3)
 
int write (String msg)
 
int setCursor (int row, int column)
 
int clear ()
 
int home ()
 
int createChar (short charSlot, byte[] charData)
 
int displayOn ()
 
int displayOff ()
 
int cursorOn ()
 
int cursorOff ()
 
int cursorBlinkOn ()
 
int cursorBlinkOff ()
 
int scrollDisplayLeft ()
 
int scrollDisplayRight ()
 
int entryLeftToRight ()
 
int entryRightToLeft ()
 
int autoscrollOn ()
 
int autoscrollOff ()
 
- Public Member Functions inherited from LCD
synchronized void delete ()
 
int write (int x, int y, String msg)
 
int write (String msg)
 
int setCursor (int row, int column)
 
int clear ()
 
int home ()
 
String name ()
 

Constructor & Destructor Documentation

Jhd1313m1 ( int  bus,
int  lcdAddress,
int  rgbAddress 
)

Jhd1313m1 constructor

Parameters
busI2C bus to use
addressSlave address the LCD is registered on
addressSlave address the RGB backlight is registered on

Member Function Documentation

int scroll ( boolean  direction)

Makes the LCD scroll text

Parameters
directionTrue if scrolling to the right
Returns
Result of the operation
int setColor ( short  r,
short  g,
short  b 
)

Sets the color of the backlight

Parameters
r0-255 value for red
g0-255 value for green
b0-255 value for blue
Returns
Result of the operation
Inheritance diagram for Jhd1313m1:
Inheritance graph
[legend]
Collaboration diagram for Jhd1313m1:
Collaboration graph
[legend]

The documentation for this class was generated from the following file: