How to connect I2C LCD to electron?

Originally, I was using an arduino mega but decided to add sms feature to my project. I connected the I2C LCD to my electron using SDA in D1 and SCL in D0. Using the “LiquidCrystal_I2C_Spark” library and “wire”, I tried the clock example, and I just get random characters. I read a couple of other posts connecting an I2C LCD to a proton with pull up resistors, but that did not change anything.

Is there something wrong with the way I connected my I2C LCD to my electron or is this a problem with the example code I’m using?

@w.kaylee, what value pull-up resistors did you try and to what voltage did you tie them to? Also, which I2C LCD unit are you using?

I have tried 4.7 ohm,4.7k, 1k, and 10k resistors. I have tied them to 5V external and again with the 3V from the electron. I am using a 20x4 I2C LCD2004A

Is this a native I2C display or a standard HD44780 type with a backpack?
A link to a proper datasheet or a full part number would help. There are two common I2C expanders used with displays, the MCP23008 and the PCF8574 you would need to use a matching library.
When it comes to native I2C displays, things can get a bit trickier, there are several types out there, I have used a Raystar one which uses an RW1063 interface this appears to be roughly the same as an ST7036 for which F. Malpartida had an Arduino library. One of the Particle libraries also mostly worked if you told it the display was an OLED but that then assumed features an LCD does not typically have.

I have the PCF8574 expander. What library would I have to use?

I think in that case you have the right one…

@w.kaylee , were you able to figure out the solution?
The same LCD panel works perfectly with a Photon, but it stops working when I try to connect to an Electron, using the very same sketch.