Using the Photon with an I2C LCD display

I following this Tutorial I2C Information and I can see that my LCD display has an address of 0x27 as displayed by the code

But I cannot get any of the Code examples to work on my screen. No characters are appearing on the screen at all.

How do I start to work out what might be wrong? I assume that since I can get the address using the I2C Scanner my connections are OK.

I can turn the backlight on and off via my code. But can’t print any thing, or can’t see anything I am printing.

Anybodies guess …

  • The contrast is wrong so you simply cannot read the display
  • You’re addressing it wrong - perhaps using 27 instead of 0x27, or not how the library expects to receive it
  • You’re trying the wrong library for your display - there are 2 common “backpacks” to make I2C displays from standard as well as native I2C displays
  • The 0x27 is something else…

Give 0x3F a try and/or follow mine project here.

Infact that is exactly the project I used. I can get the I2C address and I can get the backlight to come on and off. But I cannot get any characters displayed or visible.

On the backside there is a blue potentiometer: use a small screwdriver to change the brightness.
Its possible for you to upload some pictures? Double checked D0 / D1?

Yup it was that pot at the back ! Turned it and can now see the text.

Strictly speaking this is contrast not brightness the brightness is set with a current limiting resistor to the backlight rails.

This is just for anyone else that might see this thread in the future.

I am using a LCD 2004 i.e. 20 characters per line and 4 lines. I didn’t use any external pull up resistors.

I following this Tutorial Found that LCD display has an address of 0x27 as displayed by the code

And then I used this example but changed the address to 0x27 rather than 0x3F


I’m having very similar problem. On max brightness I can barely see text on my 20x4 LCD.
I suspect it’s because it needs 5v and Photon provides only 3.3v.

Do you know is where a way to make it work, or shall I use something with more power? Thanks.

What exact display are you using.
If it has a dedicated backlight pin you can wire that to Vin to power it at 5V.

Not sure how to check an exact model, I’ll copy-paste it from an ebay description:
Part Number: ERM2004DNS-1-4832
Display Type: FFSTN-LCD Black
Power Supply(Typ): 5V

Looks like it’s actually 5v version, I’ve realized there are different versions of it. I’ll try to order 3.3v version.

The Photon is 5V tolerant on the I2C pins, so you can use Vin to power the LCD off the Photon with 5V.

1 Like

That I didn’t know! Thanks, works as a charm.

1 Like

For future reference and anybody finding this in future

(this only applies to Photon/P0/P1 and Electron/E-Series; on Gen3 devices no GPIOs are tolerant to 5V)