20X4 LCD DISPLAY CODE REQUEST

HI ANYONE,

CAN HELP TO PROVIDE THE 20x4 LCD DISPLAY CODE PLEASE. THANKS

Please don't use capital letters, it's considered shouting.

In your code, in your other post, change:

  lcd.begin(16, 2);

to:

  lcd.begin(20, 4);

You will need to install the LiquidCrystal_I2C.

This is the sketch we use to test our LCDs. You can use it to give you an idea how to work with it.

/*
 This sketch will display a series of numbers 0-44 on a LCD screen 20x4 filling each line with consecutive numbers until it reaches
 the end and then it starts again. 
 
 Code used for learning purposes developed by: www.HackerspaceLA.org | @hackerspacela 
 Code modified from Adafruit at: https://www.arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
 This example code is in the public domain: http://www.arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
 */
 // include the library code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

//#define pins:

#define I2C_ADDR    0x27 // LCD address (make sure you run the I2C scanner to verify our LCD address)
#define Rs_pin  0        // Assign pins between I2C and LCD
#define Rw_pin  1
#define En_pin  2
#define BACKLIGHT_PIN 3
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);


// initialize the library with the numbers of the interface pins

void setup() {
  // set up backlight and turn on module:
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
  // set up the LCD's number of columns and rows:
lcd.begin(20, 4); //My LCD is 20x4

}

void loop() {
  // set the cursor to (0, 0) on line #1
  lcd.setCursor (0, 0);
  //lcd.autoscroll();
  // print from 0 to 14:
  for (int thisChar = 0; thisChar < 15; thisChar++) {
    lcd.print(thisChar);
    lcd.leftToRight();
    delay(500);
  }

  // set the cursor to (0, 1) on line #2
  lcd.setCursor (0, 1);
  // set the display to automatically scroll:
  //lcd.autoscroll();
  // print from 0 to 14:
  for (int thisChar = 15; thisChar < 25; thisChar++) {
    lcd.print(thisChar);
    delay(500);
  }

    // set the cursor to (0, 1) on line #3
  lcd.setCursor (0, 2);
  // set the display to automatically scroll:
  //lcd.autoscroll();
  // print from 0 to 14:
  for (int thisChar = 25; thisChar < 35; thisChar++) {
    lcd.print(thisChar);
    delay(500);
  }

    // set the cursor to (0, 1) on line #4
  lcd.setCursor (0, 3);
  // set the display to automatically scroll:
  //lcd.autoscroll();
  // print from 0 to 14:
  for (int thisChar = 35; thisChar < 45; thisChar++) {
    lcd.print(thisChar);
    delay(500);
  }
    
  // turn off automatic scrolling
  lcd.noAutoscroll();

  // clear screen for the next loop:
  lcd.clear();
}

See example in action here: https://goo.gl/photos/yqhsG5i93vbi22qa7

You will need to install the LiquidCrystal_I2C.

Are you sure about that?

Don

Maybe this will help

Why are you SHOUTING at us?

Please fix your keyboard.

// Per.

Lots of information and example code HERE:

http://arduino-info.wikispaces.com/LCD-Blue-I2C

Make sure you have identified the right 'backback" I2C module....

terryking228:
Lots of information and example code HERE:

http://arduino-info.wikispaces.com/LCD-Blue-I2C

Make sure you have identified the right 'backback" I2C module....

I frequently point people to your tutorial but it won't do any good in this case. He's not using any backpack I2C module.

Don

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Build options changed, rebuilding all
C:\Users\Surajika\Documents\Arduino\LCD2004\LCD2004.ino:12:31: fatal error: LiquidCrystal_I2C.h: No such file or directory

#include <LiquidCrystal_I2C.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.