Trouble with 20x4 I2C display

Hi there,

I’m having trouble with an LCD display - It just shows 2 bars on lines 1 and 3. This is the code that I’m using:

I have the display wired up with 4.7k Ohm pull-up resistors, on D0 and D1 - I’ve tried switching D0 and D1, nothing seems to be working.

Also tried the contrast adjustment.

No dice.

Any ideas?

Last time I had similar problems with an LCD-display, it turned out that it didn’t get enough power. The voltage supplied was lower than what was required. I suggest you to verify the specs of the display. Second suggestion: test the display using an arduino or compatible clone using a different library. It could be the used code has bugs or incompatibilities…

I’m using a 5V power supply board that plugs into the breadboard, It supplies 1A. I tried running the Spark from USB and the display from the power supply, still no dice.

Unfortunately I don’t have an Arduino to play with yet.

Could it be something in the code? Can someone run this on their setup and verify if it works?