Monday, February 24, 2014

SainSmart I2C LCD

It seems a lot of folks are having problems getting the SainSmart I2C LCD working. This is a shame, as the I2C LCD only uses 2 data lines, A4 (SDA) & A5 (SCL), on the UNO, or 20 (SDA) & 21 (SCL) on the MEGA, in addition to +5v and Gnd.

Well, there is a good reason for the difficulty!

The published I2C address is wrong.

A friend of mine sent me a unit he thought was defective, but doing some research, I found that the correct address is 0x3F. Thank you ianbren for a sample sketch I modified for this tutorial:

Code -
I2C LCD Library -

You can verify the I2C address of any connected I2C device with the following sketch:
I2C Scanner code -