Controlling 16x2 Character Display with Arduino

Controlling 16x2 Character Display with Arduino © GPL3+

This project shows you how to control 16x2 character display with an Arduino. Enjoy!

  • 1,161 views
  • 0 comments
  • 3 respects

Components and supplies

Apps and online services

About this project

This project shows you how to control a Sparkfun 16x2 Character display using Arduino.

Let's start making:

Connect the jumper wires, Arduino and Sparkfun display to breadboard.

  • LCD V55 pin to Arduino GND
  • LCD VDD pin to Arduino 5V
  • LCD VO (pin3) to potentionmeter middle pin
  • LCD RS pin to digital pin 12
  • LCD RW pin to Arduino GND
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD A+ pin to Arduino 5V
  • LCD k- pin to Arduino GND

After connection:

Connect your Arduino to the computer and CODE:

// include the library code: 
#include <LiquidCrystal.h> 
// initialize the library with the numbers of the interface pins 
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 
void setup() { 
 // set up the LCD's number of columns and rows: 
 lcd.begin(16, 2); 
 // Print a message to the LCD. 
 lcd.print("Hello, Hackster!"); 
} 
void loop() { 
 // set the cursor to column 0, line 1 
 // (note: line 1 is the second row, since counting begins with 0): 
 lcd.setCursor(0, 1); 
 // print the number of seconds since reset: 
 lcd.print(millis() / 1000); 
} 

Or open Arduino IDE and go to file/example/liquid crystal/Hello world. Set contrast in potentionmeter. Enjoy.

Code

code for displayC/C++
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Hello, Hackster!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

Schematics

circuit diagaram of 16 x 2 display
Untitled sketch bb gqohd06s7i
circuit diagram of Sparkfun display
Untitled sketch bb stwtjo0xfm

Comments

Similar projects you might like

Easily Wire a 16x2 LCD

Project showcase by ThomTronics

  • 9,388 views
  • 0 comments
  • 15 respects

DHT11 Humidity + Temperature Sensor with 16x2 LCD display

Project showcase by onatto22

  • 55,851 views
  • 14 comments
  • 59 respects

GPS Location Display With GPS And TFT Display Shields

Project tutorial by Boian Mitov

  • 28,419 views
  • 8 comments
  • 42 respects

Arduino DTH22 Humidity Temperature With LCD I2C 16x2 Display

Project tutorial by GiftedMedia

  • 79,143 views
  • 23 comments
  • 91 respects

Adjusting Clock on 128×64 Monochrome Display (ST7920)

Project tutorial by FLORICA Tudor-Nicusor

  • 15,879 views
  • 3 comments
  • 31 respects

8bit Number Display

Project tutorial by Alireza Karkon

  • 2,480 views
  • 0 comments
  • 7 respects
Add projectSign up / Login