Hi All,
I am new to Arduino, and have started a small project that will eventually be generated into a sizable one.
My issue is , I have purchased this LCD ( Okdo TS2160-A, I2C 2004 LCD Module LCD Display Module for Micro:bit and Arduino) but unable to make it display data despite applying the following library on Arduino example and pin out, was hoping some would help.
Do I need anything else in order to make it work?
Sorry need to mention that I am using the new Nano R4
Thanks
//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("Hello, world!");
lcd.setCursor(2,1);
lcd.print("Ywrobot Arduino!");
lcd.setCursor(0,2);
lcd.print("Arduino LCM IIC 2004");
lcd.setCursor(2,3);
lcd.print("Power By Ec-yuan!");
}
type or paste code here
void loop()
{
}`Use code tags to format code for the forum`
@berlinss Welcome to the Arduino forum! This is a technical forum, focused on technical solutions to technical problems. Technical solutions require technical information.
As a new member, you may as yet be unaware that your attention to early responses to your first post influences enthusiasm for responding to your needs - your response to the requests @sterretje made can predict a lot about how quickly your question will be resolved.
I hope that at this point, you're feverishly producing the abovementioned information, but be aware, many helpers simply move along, never to return when it becomes apparent you aren't responding to requests for more information. Even a quick post saying "more information pending" will keep us 'patiently waiting, on the hook'...
Hi @berlinss. I see this display uses an RJ11 connector (like an old school landline phone cable). Are you using that connector to connect the display to the Nano R4, or did you instead make the electrical connections via the plated through holes on the circuit board? If the latter, did you solder the connections to the circuit board?
Did you add 4.7k "pull-up" resistors on the I2C lines as specified in the Nano R4 documentation?:
The I²C protocol requires pull-up resistors on both SDA and SCL lines. The Nano R4 board does not have internal pull-ups on A4 and A5 to avoid interference with their analog input functionality, so external 4.7kΩ pull-up resistors to +5 VDC are required for proper I²C operation.
The first thing to try is the i2c scanner sketch from the examples menu in the IDE. Until you know that the display is visible on the i2c bus, there is no point trying any other code.
Hi Ptillisch,
Thanks so much for your response, I actually soldered 4 wires on the RJ11 contacts (reversed side), mirroring the RJ11 , and No I did not use any 4.7K pull-up resistor on the I2C , I will try that and let you know , hoping that the nano has not pulled up more that 0.8A recommended for each I/O pins
Thanks for that
Hi Paul,
Yes indeed the LCD is the exact same , as it was purchased from RS Comp...I have done the connection the same way as yourself, to no avail, I have the backlight on, but no Data on display, I will try the 4.7K resistor to see if it makes a difference. I think you should try that too.
You Guys are the best , thank you all, I ordered a 4.7K resistor today obviously I have to wait for them to be delivered, as I did not have any , however going by your suggestions I had some 10K in stock , I tried that and it worked a treat . SOOOOOOOOO HAPPPYYYYYYYYY
Thanks to you all
@berlinss
I'll just take a moment to point out that had you presented a schematic, as requested early on, it would have been immediately evident to many that you were missing the pullups. Just one of the many advantages of following the posting guidelines.