Learn and Understanding of LCD 16x2 with Arduino Uno

Let's play and learn with LCD 16x2 and arduino Uno.

Material needs:
- Arduin Uno
- LCD 16x2 Module

Arduino Uno
LCD 16x2 Module
Write down this sketch:

//Sample using LiquidCrystal library
#include <LiquidCrystal.h>                             // LCD library. downloaded here.
#include <delay.h>                                         // Library include in IDE.

// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);                   // Define pin LCD module

void setup()
{
  lcd.begin(16,2);                                            // Initialization LCD 16x2
  lcd.setCursor(4,0);                                       // position cursor on 5th character on first column
  lcd.print("HOHOHO");                                // Type as HOHOHO
  lcd.setCursor(2,1);                                       // position cursor on 3nd character on second column
  lcd.print("Arduino World");                           // type as Arduino World
}
void loop(){}

Here is the pinout of the shield
Pin out LCD module
Starting character is from 0 to 15. so totally character is 16 character.
if you type lcd.setCursor(4,0); it means starting on 5th and first column.
4 --> 0 to 4 = 5 character
0 --> column used

I hope you understand with my explanation.
If you would to ask me, feel free to contact in comment.

Thanks

Comments

Popular posts from this blog

Membuat lampu otomatis menggunakan arduino dan RTC (Untuk 2 lampu)

Cara menggunakan tombol keypad pada LCD shield (How to use keypad on LCD shield)

Cara menggunakan modul relay dengan arduino (How to use relay module with Ardunio)