LiquidCrystal Library

Using The Library

Basic Setup

In your main sketch file


//----- LCD DISPLAY -----
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 10, 11, 9, 8, 7, 6);    //7 wire usage: (rs, rw, enable, d4, d5, d6, d7) 

If you want to use it in other files also


#include <LiquidCrystal.h>
extern LiquidCrystal lcd;

Initialise


  //----- SETUP LCD -----
  lcd.begin(20, 2);        //Characters per line, no of lines
Writing To Screen

Write text


  lcd.setCursor(0, 0);            //Character, Line
  lcd.print("Hello               ");
  lcd.setCursor(0, 1);
  lcd.print("World               ");

Write single characters


  lcd.write("1");
  lcd.write(0x30 + b_temp);

 

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *