Introduction: Interfacing LCD With Arduino on Tinkercad
The code in this article is written for LCD’s that use the standard Hitachi HD44780 driver. If your LCD has 16 pins, then it probably has the Hitachi HD44780 driver. These displays can be wired in either 4 bit mode or 8 bit mode. Wiring the LCD in 4 bit mode is usually preferred since it uses four less wires than 8 bit mode. In practice, there isn’t a noticeable difference in performance between the two modes. In this tutorial, I’ll connect the LCD in 4 bit mode.
Step 1: What You Need
For this tutorial you will need:
1.Arduino uno
2.Breadboard or PCB
3.LCD 16x2
4.Potentiometer
Step 2: LCD Pinout and Connections With Arduino
Here’s a diagram of the pins on the LCD I’m using. The connections from each pin to the Arduino will be the same, but your pins might be arranged differently on the LCD. Be sure to check the datasheet or look for labels on your particular LCD:
Also, you might need to solder a 16 pin header to your LCD before connecting it to a breadboard. Follow the diagram below to wire the LCD to your Arduino:
Rs pin (RS) - 1
Enable (E) - 2
D4 - 4
D5 - 5
D6 - 6
D7 - 7
The resistor in the diagram above sets the backlight brightness. A typical value is 220 Ohms, but other values will work too. Smaller resistors will make the backlight brighter.
The potentiometer is used to adjust the screen contrast. I typically use a 10K Ohm potentiometer, but other values will also work.
Step 3: Programming the Arduino
All of the code below uses the LiquidCrystal library that comes pre-installed with the Arduino IDE. A library is a set of functions that can be easily added to a program in an abbreviated format.
In order to use a library, it needs be included in the program. Line 1 in the code below does this with the command #include . When you include a library in a program, all of the code in the library gets uploaded to the Ardunio along with the code for your program.
Now we’re ready to get into the programming! I’ll go over more interesting things you can do in a moment, but for now lets just run a simple test program. This program will print “Welcome to my class” to the screen then after some delay " New way of learning" and at the end " Arduino class by Mudit jain" where my name will blink . Enter this code into the tinkercad code area and start the simulation.
Step 4: Code
For more interesting projects connect with me on:
Youtube:https://www.youtube.com/channel/UCTS10_CRYJhT-vb9-pvKzzg
Facebook page: https://www.facebook.com/techeor1/
Instagram: https://instagram.com/official_techeor?igshid=uc8l10avryni
#include<LiquidCrystal.h> LiquidCrystal lcd (1,2,4,5,6,7); void setup() { lcd.begin(16,2); lcd.setCursor(5,0); lcd.print("WELCOME"); lcd.setCursor(3,1); lcd.print("TO MY CLASS"); delay(2000); lcd.setCursor(5,0); lcd.print("New Way"); lcd.setCursor(3,1); lcd.print("Of Learning"); delay(2000); lcd.clear(); } void loop() { lcd.setCursor(2,0); lcd.print("Arduino class"); lcd.setCursor(2,1); lcd.print("By MUDIT JAIN"); delay(500); lcd.clear(); lcd.setCursor(2,0); lcd.print("Arduino class"); delay(500); }
Attachments
Step 5: Code and Circuit Diagram Explained Fully:
If you are a beginner then it might help you a lot because I have explained the circuit diagram and code in brief. You will learn how to print something on the 16*2 LCD and brief about lcd.setCursor command.
GOOD LUCK.

Participated in the
Arduino Contest 2020
2 People Made This Project!
- KiFouine made it!
- adityagarg.ag2000 made it!
10 Comments
2 years ago
You project was very helpful. Is there a way we can programm lcd display using blocks instead of text?
2 years ago
Sorry, it seems like your code has some errors.
1:9: error: #include expects "FILENAME" or
2:1: error: 'LiquidCrystal' does not name a type
In function 'void setup()':
4:3: error: 'lcd' was not declared in this scope
In function 'void loop()':
19:1: error: 'lcd' was not declared in this scope
Reply 2 years ago
No need to add any library in the tinkercad.
Please share the screenshot of the error you are facing on
Instagram-https://instagram.com/official_techeor?igshid=uc8l10avryni
Fb page- https://www.facebook.com/techeor1/
Reply 2 years ago
ok
i found the bug
the first line should read
#include <LiquidCrystal.h>
for some reason that part doesn't copy with ctr+c
still thanks for the tutorial - it helped
2 years ago
i dont like this project because there is nothing uning in this and also with your other projects
Reply 2 years ago
Thanks that you gone through my projects. It's just an interfacing because many new people who don't know much Arduino wants to learn. So I am trying to make circuits and codes as simple as I can.
Reply 2 years ago
Thanks I’m am learning and I find it helpful to have a simple presentation like this.
Reply 2 years ago
Thanks, a lot @neurofield. If you have any doubt you can ask here or on my Instagram account.
https://instagram.com/mudit_5246?igshid=1bmnk9ra9qakw
Reply 2 years ago
I don't understand why robotech had to say that.
Reply 2 years ago
Thanks and stay connected for more projects 🥰