Arduino Nano 33 IoT - LCD 20x4
This guide shows you how to hook up a 20x4 LCD screen (a type of liquid display) to the Arduino Nano 33 IoT board using the I2C connection.

Hardware Preparation
Or you can buy the following sensor kits:
1 | × | DIYables Sensor Kit (30 sensors/displays) | |
1 | × | DIYables Sensor Kit (18 sensors/displays) |
Additionally, some of these links are for products from our own brand, DIYables .
Overview of LCD I2C 20x4
Pinout
The 20x4 LCD with I2C works with an I2C connection, so it has four pins:
- GND pin: Connect this to ground (0 volts).
- VCC pin: Connect this to the power supply (5 volts).
- SDA pin: This is the data line for I2C.
- SCL pin: This is the clock line for I2C.

LCD Coordinate
LCD I2C 20x4 has 20 columns and 4 rows. The columns and rows start counting from 0.

Wiring Diagram
- When giving power to the Arduino Nano 33 IoT board through the USB port.

This image is created using Fritzing. Click to enlarge image
- When powering the Arduino Nano 33 IoT board through the Vin pin.

This image is created using Fritzing. Click to enlarge image
※ NOTE THAT:
If you power the Arduino Nano 33 IoT using the USB port, you can also use the VBUS pin to run the LCD display without needing another power source. However, be aware that the VBUS pin might not give enough power for the LCD display to work correctly.
LCD I2C | Arduino Nano 33 IoT |
---|---|
VCC | 5V |
GND | GND |
SDA | A4 |
SCL | A5 |
How To Program For LCD I2C
Thanks to the LiquidCrystal_I2C library, using the LCD is very easy.
- Add the library:
- Create a LiquidCrystal_I2C object by providing its I2C address, the number of columns, and the number of rows.
- Set up the LCD.
- Move the cursor to the spot you want (column number, row number)
- Display a message on the LCD screen.
※ NOTE THAT:
The LCD's I2C address might be different depending on who made it. In our code, we used 0x27, which is recommended by the DIYables manufacturer.
Arduino Nano 33 IoT Code
Detailed Instructions
If you are new to the Arduino Nano 33 IoT, be sure to check out our Getting Started with Arduino Nano 33 IoT tutorial. Then, follow these steps:
- Connect the components to the Arduino Nano 33 IoT board as depicted in the diagram.
- Use a USB cable to connect the Arduino Nano 33 IoT board to your computer.
- Launch the Arduino IDE on your computer.
- Select the Arduino Nano 33 IoT board and choose its corresponding COM port.
- Open the Library Manager by clicking the Library Manager icon on the left side of the Arduino IDE.
- Type LiquidCrystal I2C into the search box. Then, look for the LiquidCrystal_I2C library by Frank de Brabander.
- Click the Install button to add the LiquidCrystal_I2C library.

- Copy the code above and open it in the Arduino IDE.
- Click the Upload button in the Arduino IDE to load the code onto the Arduino Nano 33 IoT.
- Watch the result on the LCD screen.
- Try changing the text and its position.