For those who want to tinker with this low cost display, the following code may be of interest. I adapted the st7036 class to drive both lines of the LCD.
`/* I2C Display Module */
class st7036{
_i2c = null;
_addr = null;
constructor(i2c, addr = 0x78)
{
_i2c = i2c;
_addr = addr;
//This magical line came straight from the datasheet code example
// 0x38 = 2-lines, Single Height, Instruction 00 = ??
// 0x39 = 2-lines, Single Height, Instruction 01 = Bias Set
// 0x14 = Bias Set = 1/4 Bias
// 0x71 = Contrast set {0x70…0x7F}
// 0x5E = Power/ICON
// 0x6D = Follower control
// 0x0C = Display ON, cursor OFF
// 0x01 = Clear display
// 0x06 = Entry mode set
_i2c.write(_addr, format("%c%c%c%c%c%c%c%c%c%c", 0x00, 0x38, 0x39, 0x14, 0x71, 0x5E, 0x6D, 0x0C, 0x01, 0x06));
}
function write(str) { _i2c.write(_addr, format("%c%s", 0x40,str)); }
function cls() { _i2c.write(_addr, format("%c%c",0x00,0x01)); }
function line1() { _i2c.write(_addr, format("%c%c",0x00,0x80)); }
function line2() { _i2c.write(_addr, format("%c%c",0x00,0xC0)); }
}`
Here is how to use it:
`
i2c <- hardware.i2c12;
i2c.configure(CLOCK_SPEED_50_KHZ);
//Do not forget to reset the LCD (Rst pin active LOW)
disp <- st7036(i2c);
disp.line1();
disp.write(“123456”);
disp.line2();
disp.write(“abcdef”);`
have fun 