Cant print anything onto LCD screen

I have an LCD screen 16x2 4 pin which I cant seem to print on. I use an arduino nano with the code LQFP32 and I have the wires connected as
VCC > 5v
GND > GND
SDA > A4
SCL > A5
I can communicate fine with the LCD, I have ran scans to check if its connected and I am also able to control things like the backlight. Just nothing prints onto the LCD.

here is the code I have been trying to use :

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

char data = "h";


void setup() {
  lcd.init();
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.clear();
  lcd.backlight();
  delay(200);
  lcd.print(data);
}

void loop() {
  
}

First of all, this line is wrong:
char data = "h";

Try :
char data = 'h';

Then what appears on your LCD?

Post a LCD image.

char *data = "hello noob"; // declares an 11 char string array

You might need to set the cursor position....

didnt change anything

Tried that and nothing happened

Here work...

Show your LCD project image,

im not quite sure how that website works but that is the same setup I have but I use an arduino nano instead of uno.

I will change to nano....

thats correct

How do you set the contrast of your LCD?

im not sure what you mean, I havent done anything with the contrast

You seem to be having more problems with this "Nano" which uses a clone of the ATmega328P chip based on your previous thread: Arduino nano prints random characters

Google for "LGT8F328P arduino i2c problem"

The I2C backpack has a blue potentiometer which you adjust to optimise the display performance.

1 Like

This is why others here ask you to post your code and circuit diagram.

The more information you provide, the faster and more likely you'll receive a solution.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.