Serial I2C 1602 LCD Attempts - All Have Failed. Help Please?

I have been trying to get an LCD working with the IMP using I2C on pins 1 and 2 for months. (off an on a bit) I have tried three different displays, two different serial backpacks and one sold together. All with no luck. I have tried the basic 3.3V to power the LCD and the 5V it states it is for (using 3.3 zeners to limit voltage to the imp and without) I’ve tried pullup resistors on pins 1 and 2 as well. All don’t seem to display text. I get a return value of 0 when the address is correct so I’m pretty sure it’s good electrically and address wise. I have also set up pins 1 and 2 as basic digital outs to verify connectivity as I’ve read of some issues with them. They tested fine driving an LED. I imagine it’s just in how I’m formatting the display string or the setup parameters.

Here is the serial display I tried most recently: I got from Ebay

This is the most basic code I could come up with. It returns a 0 but never displays anything. I’m about to give up. If anybody can take a peek and offer me some advice I’d love it! Or if you have a serial I2C LCD in use on your IMP, offer me your basic LCD code and I’ll see if I can get it to work on mine. Anything at this point would be great!

`
local i2c_add = (0x27<<1);

function writeToDisplay(){
// Clear the display
hardware.i2c12.write(i2c_add,“v”);
server.log("LCD i2c write during clear was: ");

local data = format("%c%c%c%c%c%c",0x00,0x38,0x0E,0x0F,0x06,0x01);

hardware.i2c12.write(i2c_add, data);
server.log(hardware.i2c12.write(i2c_add, data));
imp.sleep(0.5)

hardware.i2c12.write(i2c_add, format("%c",0x40)+"blah0");
server.log("test 0");
imp.sleep(5);

}

imp.configure(“LCD”, [], []);
hardware.i2c12.configure(CLOCK_SPEED_100_KHZ);
imp.sleep(0.1)

writeToDisplay();
`

Are there any registers or anything on the module that you can try doing an i2c read from?

No, it’s simply a serial backpack on a 1602 LCD. But it does register a return code of 0 if it connects properly.

Finally got it working using Omri’s code. Here is a link to his github code. Thanks! https://github.com/omribahumi/imp_i2c_lcd/blob/master/ImpLcd.nut