I can't write any chars on LCD

Hello. I’m new in the Arduino. I bought this kit. I made same things with LEDs, but when I tried write text to LCD display, I’m failed. I Followed this tutorial and later some others. All times I had only blue screen without any words or chars. Later, I re-uploaded that code and several random chars appeared on 1st line. What I’m doing wrong?
I’m new and I doesn’t know precise terms, so I couldn’t really describe my wiring, used components etc, so there yo have some pictures:



and code:

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
 
LiquidCrystal_I2C lcd(0x27,16,2);
void setup()  {
 lcd.init();
 lcd.backlight();
 lcd.print("Hello!");
}
void loop()  {
}

I’ll b happy, for all answers!!

Have you checked that the default I/O extender pins in the library match the pins used on your particular board?

How I can get the find out default I/O pins on board? On board isn't brand name, only UNO text.

Oh sorry, I understood. No Arduino board, but extender. I have arduino two days, so I must google that. But, I can't find, what pins match and what no. I found that I'm using PCF8574P extender. It will help?

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

Try that - it works on mine

First, the soldering of the module pins of the back to the LCD does not look very good, and you should check for any bridges and correct any cold solder joints.

You can determine the correct constructor for the i2c module by using Bil Perry’s i2c lcd guesser program which I have attached.

In order to use that program, you will first need to install the fmalpartida LiquidCrystal library referenced in the Perry sketch. You will need to rename your existing liquid libraries and place in a different folder to use this library or there will be library conflicts.

Please make sure to read the instructions for the i2c lcd guesser.

i2cLCDguesser.ino (12 KB)

AWOL: Doesn't work :confused:
cattledog: ad soldering:
I know, thats ugly, but without bridges.
ad guesser program:
It hasn't written nothing. if I understood instructions, It should to write pin configuration to display, but didn't. Display remained empty.

fretka323:
It hasn’t written nothing. if I understood instructions, It should to write pin configuration to display, but didn’t. Display remained empty.

cattledog:
Please make sure to read the instructions for the i2c lcd guesser.

So, what do the instructions tell you to do?

And what did the serial monitor tell you?

 *  For each guess it will re-initialize the display and
 *  write the constructor to the serial port.
 *  It will then attempt to blink the backlight 3 times.
 *  Finally it will attempt to write the constructor used to the LCD.
 *  When the correct configuration is guessed,
 *  the LCD will display the constructor
 *  and the backlight will be on.
 *
 * Since the guesser uses a limited number of known permutations,
 * it is possible that it will not be able to guess the needed
 * wiring.
 * 
 *  To use:
 *  1. install fm's library (it replaces the stock LiquidCrystal library)
 *  2. hookup the i2c backpack and only the i2c backpack to the Arduino
 *    (make sure to use the needed pullup resistors - 
 *      i2c needs them to work correctly)
 *  3. compile and upload the sketch
 *  4. go to the serial monitor in the IDE and set the baud rate to 9600 baud
 *  5. press the reset button on the arduino to start clean
 *  6. Press the <ENTER> key or [Send] button to advance to next guess
 *     NOTE: Make sure to select a newline as the line ending and
 *           if using the <ENTER> key you must first click on the text box
 *           to give it focus.

Serial output:

NOTE/WARNING: Guessing the i2c constructor is not really a
good thing since it could damage the hardware. Use with caution!
Do not leave things with an incorrect guess for too long.
i.e. advance to the next guess as soon as possible
when the guess in incorrect.
If the guess is correct, the constructor will show up
on the LCD.

<Press or click [Send] to Continue>
Scanning i2c bus for devices…
i2c device found at address 0x27
Device found: PCF8574
<Press or click [Send] to start guessing>
Trying: lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x27, 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x27, 6, 5, 4, 0, 1, 2, 3, 7, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x27, 6, 5, 4, 0, 1, 2, 3, 7, POSITIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x27, 4, 5, 6, 0, 1, 2, 3, 7, POSITIVE)
<Press or click [Send] to Continue>

If the guess is correct, the constructor will show up
on the LCD.

And what did the LCD display tell you?

Don

Nothing. Only backlight blink for each guessing.

Well I guess you are going to have to break down and reveal some more information about the specific I2C adapter that you are using.

Don

Nothing. Only backlight blink for each guessing.

The backlight should blink 3 times for either two or four of the selections. Is it blinking for the two constructrors with backlight POSITIVE or NEGATIVE on pin 3, or the four selections with the backlight on pin 7.

The backlight should blink 3 times for either two or four of the selections.

Not if his particular I2C adapter doesn't match any of those constructors.

Don

I wanted to resolder it, but I burned out my cheap soldering iron, so I had to buy new one. Now I connected it without I2C adapter. IT WORKS!! Problem was in I2C - PCB was destroyed during desoldering, previously it does not fall apart maybe just because of the layer of tin.