I picked up an inexpensive 16x2 I2C LCD Module from Ebay for use with a Photon project. I chose this particular module for the background color. I figured that the I2C communication would work on any LCD module, but I'm having problems getting it working. I'm not sure if I need some sort of custom library for this thing.
The seller is BuyDisplay.com, aka EastRising. The unit was $5.90 on EBay, shipped from China (nicely packaged) in about 2 weeks. They also have a website with lots of datasheets and info.
Despite this, I can't get it to display anything. The backlight works, but I have been unable to get the display to function.
Below is my wiring diagram and code, which I incorporated from this tutorial by Apptechie. I also included pull-up resistors, but I tried the setup both with and without them to no avail.
The vendor documentation shows the I2C HEX address of the LCD as:
Write_Address 0x7c/*slave addresses with write
Read_Address 0x7d/*slave addresses with read
I tried both 0x7c and 0x7D, but neither worked.
Is this the proper library and code to interface with this device? Or is it a wiring/hardware issue? I'm new to I2C, so any help you can offer would be appreciated.
Wiring Diagram:
Code:
// This #include statement was automatically added by the Particle IDE. #include <LiquidCrystal_I2C_Spark.h> LiquidCrystal_I2C *lcd; void setup() { Serial.begin(9600); // Write_Address 0x7c/*slave addresses with write*/ // Read_Address 0x7d/*slave addresses with read*/ //also tried addresses 0x18, 0x20, 0x22 lcd = new LiquidCrystal_I2C(0x7d, 16, 2); lcd->init(); lcd->backlight(); lcd->clear(); Time.zone(+2.00); } void loop() { if (Time.now(), "%H:%M:%S" == "00:00:00") { lcd->clear(); } lcd->setCursor(0 ,0 ); lcd->print("Go_Eagles!"); }
Thanks in advance for the help!