How to Connect a Serial LCD With an Arduino Nano




Introduction: How to Connect a Serial LCD With an Arduino Nano

In a earlier instructable I demonstrated how to connect the serial LCD to an Arduino UNO

Yesterday I wanted to use two Arduinos for an RF project and realized that I don't know how to use the serial LCD with the Arduino Nano. So with a bit of research I was able to connect it and decided to share it with you.

Step 1: Here Is What You Need for This Project

  1. An Arduino Nano or a Nano compatible
  2. A solderless breadboard
  3. An LCD with an I2C
  4. Four jumper wires

Step 2: Connect the LCD and the NANO

I found a pinout diagram for the Arduino NANO which clearly indicates that the SDA and the SCL pins on the NANO are the A4 and the A5 pins.

Place the NANO on the solderless breadboard

Connect the black jumper cable from the GND pin on the LCD to the BND pin on the NANO

Connect the red jumper cable from the VCC pin on the LCD to the VCC pin on the NANO

Connect the green jumper cable from the SDA pin on the LCD to the A4 pin on the NANO

Connect the yellow jumper cable from the SCL pin on the LCD to the A5 pin on the NANO

Next step load the Arduino IDE and upload the sketch

Step 3: The Sketch

I already explained the sketch in details in the previous instructable

I just changed the output on the LCD to Happy Halloween

I will include the sketch with this instructable.

//load libraries
#include <Wire.h> #include <LCD.h> #include <LiquidCrystal_I2C.h>

//Define variables

#define I2C_ADDR 0x27 //Define I2C Address where the PCF8574A is #define BACKLIGHT_PIN 3 #define En_pin 2 #define Rw_pin 1 #define Rs_pin 0 #define D4_pin 4 #define D5_pin 5 #define D6_pin 6 #define D7_pin 7

//Initialise the LCD LiquidCrystal_I2C lcd(I2C_ADDR, En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup() { //Define the LCD as 16 column by 2 rows lcd.begin (16,2); //Switch on the backlight lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); lcd.setBacklight(HIGH); //goto first column (column 0) and first line (Line 0) lcd.setCursor(5,0); //Print at cursor Location lcd.print("HAPPY"); //goto first column (column 0) and second line (line 1) lcd.setCursor(3,1); lcd.print("Halloween"); } void loop(){ }

1 Person Made This Project!


  • Halloween Contest

    Halloween Contest
  • Back to School: Student Design Challenge

    Back to School: Student Design Challenge
  • Fried Food Challenge

    Fried Food Challenge



1 year ago on Step 3

How about using PICO or Tiny2040 instead . Which libraries ? I have not used any arduino nano


Question 1 year ago on Step 2

Seems LCD.h is no longer in either library but this gave me what I was looking for. Thanks!


3 years ago

Hello guys. One question. Can I use instead DigitalPin 2 > DigitalPin 8 ??? Because I need DIgitalPin 2 for AttachInterrupt Coin Acceptor ... Thank you in advance


Reply 3 years ago

I am not using any digital pins in this project, which line in the code are you referring to ?


4 years ago

I cant figure out how to favorite with the new site interface so leaving a comment to remember it. Great work making this easy to follow!


4 years ago

My LCD does not display the characters and I did exactly as above. Any idea why this could happen?


6 years ago

you didnt include the lcd.h library for us to download