How To Use A 20x4 I2c Character Lcd Display With Arduino

Photo of Ron

Made by Ron / Displays / Robotics / Sensors

About the project

In this simple tutorial we wwill learn how to use a 20x4 I2C Character LCD display with Arduino Uno to display a simple text "Hello World.

Project info

Difficulty: Easy

Platforms: ArduinoVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Jumper wires (generic) Jumper wires (generic) x 1
Alphanumeric LCD, 20 x 4 Alphanumeric LCD, 20 x 4 x 1
Arduino UNO Arduino UNO x 1

Software apps and online services

Visuino Visuino
Arduino Web Editor Arduino Web Editor
Arduino IDE Arduino IDE

Story

In this simple tutorial we wwill learn how to use a 20x4 I2C Character LCD display with Arduino Uno to display a simple text "Hello World.

Watch the video!

Step 1: What You Will Need

1 / 3

  • 20x4 I2C Character LCD display
  • Jumper wires
  • Arduino Uno or any other Arduino board
  • Visuino software: Download here

Step 2: The Circuit

  • Connect LCD Display pin[VCC] to Arduino pin[5V]
  • Connect LCD Display pin[GND] to Arduino pin[GND]
  • Connect LCD Display pin[SDA] to Arduino pin[SDA]
  • Connect LCD Display pin[SCL] to Arduino pin[SCL]

Note: Use the potentiometer to adjust the brightness

Step 3: Start Visuino, and Select the Arduino UNO Board Type

1 / 2

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: in Visuino Add,Set & Connect Components

1 / 5

  • Add "Liquid Crystal Display (LCD) - I2C" component
  • Select "LiquidCrystalDisplay1" and in the properties window set Rows to 4 and columns to 20
  • Double click on the "LiquidCrystalDisplay1" and in the Elements window drag "Text Field" to the left side, then in the properties window set text to "HELLO WORLD" and width to 20
  • Close the Elements window
  • Connect "LiquidCrystalDisplay1" pin I2C Out to Arduino I2C In

Step 5: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 6: Play

If you power the Arduino UNO module, the LCD Display will start to show the "Hello World" text. In case you dont see any text make sure you adjust the brightness using a potentiometer.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu

Schematics, diagrams and documents

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...