Lcd screen arduino (very easy question)

I want to make a program that says hello to the lcd screen. My lcd screen doesn't work even though I changed the arduino board. Although it's new, I don't know exactly where it is. I tried all of them 0x27 0x3f and so on. sry for my english

Did you turn up the contrast on the back? There should be a little pot there to adjust contrast.

I don't know the contrast exactly, should I post a photo?

Did you wire it correctly (i.e., used the SDA and SCL pins)?

Here is an example of a working set up.

yes scl a5 sda a4

and finally i used mblock to make sure the code is correct

Which type of board do you use?

arduino nano

qapass ur writes on the back

@abcda. Just maybe you should show us the sketch you are using to write to the lcd (nicely embedded between code tags, </>).

#include "LiquidCrystal_I2C.h"

LiquidCrystal_I2C LCD_I2C_0x27(0x27, 16, 2);



 void setup(){
    LCD_I2C_0x27.init();
    LCD_I2C_0x27.backlight();
    LCD_I2C_0x27.setCursor(1 - 1, 1 - 1);
    LCD_I2C_0x27.print("Hello");
}



void loop() {}

Did a copy and paste of your sketch. After changing "init" to "begin", which my LiquidCrystal_I2C library requires, your sketch worked exactly as expected. Printing "Hello" in the top left lcd corner.

The sketch is not your problem.

I get an code error when I type begin.

my old lcds were working fine but not I2


This is the contrast pot. Did you adjust that? I've had at least one arrive in the mail and I couldn't see anything until I adjusted this. Turn it either direction and see what happens, it won't hurt anything.

1 Like

Here, give this sketch a go. Shouldn't your library be like this:

#include <LiquidCrystal_I2C.h>

?
Give this sketch a rip. Works great for me.

//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
  lcd.init();                      // initialize the lcd 
  // Print a message to the LCD.
  lcd.backlight();
  lcd.setCursor(3,0);
  lcd.print("Hello!");
}


void loop()
{
}

Blue blank screen when I rotate it less, white rectangles when I rotate it more, and the result I want when I rotate it medium!

1 Like

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