Guides · 9 min read

Arduino LCD Projects: 15 Builds with 16x2 and 20x4 Displays

15 Arduino LCD projects with 16x2 and 20x4 displays: thermometer, distance meter, clock, keypad lock, stopwatch, thermostat, game; I2C vs parallel, ESP32, Pico.

Arduino LCD projects are the easiest and cheapest way to show a sensor reading without staying tethered to a computer. A 16x2 character LCD writes 16 characters on each of two lines; with an I2C backpack it connects with just four wires and makes temperature, distance, time or a menu readable at a glance. The 20x4 version of the same display fits as much information as a small control panel, with four lines and 80 characters.

In this guide we've collected 15 projects you can build with a 16x2 or 20x4 LCD in one table: for each one you'll see whether the display is wired over I2C or in parallel, which sensor it uses and roughly how many lines of code it needs. Then we walk through four ready-made sketches: a stopwatch with lap times, a bar graph built from custom characters, a Wi-Fi network scanner on the ESP32 and a library-free temperature display on the Raspberry Pi Pico.

16x2 LCD with an I2C backpack
A 16x2 LCD with a PCF8574 I2C backpack soldered on the back: only 4 pins, GND, VCC, SDA and SCL.

What are 16x2 and 20x4 LCDs, and should you use I2C or parallel?

Almost every character LCD used in hobby projects runs on an HD44780-compatible driver chip. The display shows each character in a 5 x 8 dot cell; letters, digits and some symbols are built into the chip, and you can add 8 characters you draw yourself. The display itself has 16 pins and, wired directly, needs at least 6 data pins from the Arduino. The small I2C backpack (PCF8574) on the back reduces those 6 pins to two wires: SDA and SCL. The backpack's address is usually 0x27, or 0x3F on models with the PCF8574A chip; if you're not sure, find it with the I2C scanner sketch.

FeatureParallel wiringWith an I2C backpack
Arduino pins used6 (RS, E, D4-D7)2 (SDA, SCL)
LibraryLiquidCrystal (built into the Arduino IDE)LiquidCrystal_I2C
Contrast adjustmentExternal 10 kΩ potentiometerSmall trimmer on the backpack
Display update speedFasterA little slower, but more than enough for text
Several displays on one busEach display needs its own E pinUp to 8 displays if the addresses differ
When to choose itWhen you have plenty of free pins or no I2C backpackIn most projects, especially with sensors and a keypad
Feature16x2 LCD20x4 LCD
Number of characters2 lines x 16 = 324 lines x 20 = 80
Approximate module size80 x 36 mm98 x 60 mm
Declaration in codeLiquidCrystal_I2C lcd(0x27, 16, 2);LiquidCrystal_I2C lcd(0x27, 20, 4);
Good forThermometer, distance, counter, clockWeather station, menu, multi-sensor panel

LCD wiring: Arduino Uno, ESP32 and Raspberry Pi Pico

I2C LCD pinArduino UnoESP32Raspberry Pi Pico
GNDGNDGNDGND
VCC5VVIN (5 V from USB)VBUS (5 V from USB)
SDAA4GPIO 21GP4
SCLA5GPIO 22GP5
Most LCDs run on 5 V, and the pull-up resistors on the I2C backpack pull the SDA and SCL lines up to 5 V. The ESP32 and Pico pins are officially rated for 3.3 V; many people connect them directly, but the safe way is to put a logic level converter in between or remove the backpack's pull-ups and pull the lines up to 3.3 V instead. If the display shows only boxes the first time you power it, the problem is almost always contrast: turn the trimmer with a small screwdriver until the text appears.

15 Arduino LCD projects: wiring, sensor and code length

The code column shows the approximate number of lines of a typical solution, comments included; longer code doesn't mean harder, but starting with the short ones makes the first projects easier. The wiring column is the connection we suggest in this article; every project can be built either way, and the version in BlueGrays may use a different one. Projects with a name in the last column are waiting ready-made in the BlueGrays app with a circuit diagram and code; for two of those marked Idea you'll find the code in this article.

NoProjectDisplayWiringSensor or extra partApprox. codeIn BlueGrays
1Message and scrolling text16x2ParallelNone20-30 linesPrinting a Message on a 2x16 LCD
2NTC thermometer16x2ParallelNTC + 10 kΩ30-40 linesTemperature with an NTC and a 2x16 LCD
3Distance meter16x2ParallelHC-SR0430-40 linesMeasuring Distance with an LCD
4Digital voltmeter16x2I2CVoltage divider30-40 linesDigital Voltmeter with an LCD
5Digital clock16x2Parallel or I2CDS1302 or DS1307 RTC50-70 linesDS1302 RTC Clock on an LCD
6Keypad lock16x2Parallel or I2C4x4 keypad70-100 lines4x4 Keypad LCD Password App
7Calculator16x2I2C4x4 keypad80-120 linesArduino I2C Calculator
8Runner game16x2I2CButton100-150 linesArduino LCD Runner Game
9Temperature and humidity display16x2I2CDHT2230-40 linesESP32 DHT22 Temperature and Humidity (with LCD)
10Card reader16x2I2CRC522 RFID60-90 linesESP32 RFID RC522 Card Reader (with LCD)
11Weather from the internet16x2I2CESP32 Wi-Fi80-120 linesESP32 HTTPClient + Weather API (with LCD)
12Stopwatch with lap times16x2I2C2 buttons60-70 linesIdea (code below)
13Thermostat with a menu16x2 or 20x4I2CDS18B20, rotary encoder, relay150-250 linesIdea
14Multi-sensor weather station panel20x4I2CDHT22, BMP280, rain sensor80-120 linesIdea
15Bar graph with custom characters16x2I2CPotentiometer40 linesIdea (code below)

Beginner projects (1-5)

  • 1. Message and scrolling text: Print your name on the display, then scroll it from right to left with scrollDisplayLeft(). It's the first project where you learn the LCD's cursor, row and column logic; parallel wiring is detailed in the 16x2 LCD parallel wiring guide.
  • 2. NTC thermometer: A 10 kΩ NTC thermistor and a fixed resistor turn temperature into an analog voltage; you convert it to degrees Celsius with the Beta formula and print it. The formula and calibration are in the NTC thermistor guide.
  • 3. Distance meter: The HC-SR04 sensor gives the distance to an obstacle in centimetres. Printing the value at the same width every time prevents a leftover digit at the end, for example when it drops from 100 to 99.
  • 4. Digital voltmeter: With a two-resistor voltage divider it measures 0-25 V and shows it with two decimals. Very handy on the bench for checking batteries and adapters; calibration is in the Arduino voltmeter guide.
  • 5. Digital clock: The RTC module keeps time on its battery even during a power cut, and the LCD shows the time, date and day name. The differences between DS3231, DS1307 and DS1302 are in the RTC clock module guide.

Interactive projects (6-10)

  • 6. Keypad lock: The code typed on a 4x4 keypad appears as asterisks on the display; if it's right, a relay or servo opens the lock, and after three wrong tries the system locks for a while. Keypad wiring is in the keypad guide.
  • 7. Calculator: The keypad's A, B, C and D keys get the four operations and the result appears on the LCD's second line. Building numbers digit by digit and catching division by zero is a good programming exercise.
  • 8. Runner game: A little figure made of custom characters jumps over obstacles when you press the button. Perfect for seeing that you can make a game even with a 16x2 display; more games are in Arduino game projects.
  • 9. Temperature and humidity display: The DHT22's temperature appears on the top line and humidity on the bottom. The DHT22 should be read at most once every two seconds; reading more often gives errors. Sensor details are in the DHT11 and DHT22 guide.
  • 10. Card reader: The number of a card held near the RC522 reader is printed on the display, and known cards get a Welcome message. The RC522 uses SPI and the LCD uses I2C, so both work on the same board without conflict; setup is in the RFID RC522 guide.

Connected and advanced projects (11-15)

  • 11. Weather from the internet: The ESP32 fetches JSON data from a weather service and the city's temperature and conditions appear on the LCD. The steps for fetching from an API are in the ESP32 weather guide.
  • 12. Stopwatch with lap times (idea): One button starts and stops it; the other saves the lap time to the bottom line or resets. The code is below.
  • 13. Thermostat with a menu (idea): With a rotary encoder you set the target temperature and hysteresis in a menu, the values are saved to EEPROM and a relay switches the heater. The menu skeleton is in the Arduino LCD menu guide and reading the encoder in the rotary encoder guide.
  • 14. Multi-sensor weather station panel (idea): Temperature, humidity, pressure and rain status all fit at once on the four lines of a 20x4 display. Sensor wiring and code are in the Arduino weather station guide; to switch to 20x4 just change 16 and 2 in the declaration to 20 and 4.
  • 15. Bar graph with custom characters (idea): Shows a value such as a potentiometer, a sound level or a water tank as a smooth 16-cell, 80-step bar. The code is below.

Stopwatch code (project 12)

Wire the I2C LCD as in the table. Put the start/stop button between D2 and GND and the lap/reset button between D3 and GND; the code uses the internal pull-up resistors. While the stopwatch runs, the second button writes the current time to the bottom line as a lap; when it's stopped, it resets the time. Before compiling, install the LiquidCrystal_I2C library from the Library Manager.

C++ (Arduino IDE)
1// Proje 12: I2C LCD kronometre ve tur zamanı / I2C LCD stopwatch with lap time
2#include <Wire.h>
3#include <LiquidCrystal_I2C.h>
4
5LiquidCrystal_I2C lcd(0x27, 16, 2);   // adres 0x27 ya da 0x3F / address 0x27 or 0x3F
6const int START_BTN = 2;              // başlat / durdur - start / stop (GND'ye / to GND)
7const int LAP_BTN = 3;                // tur / sıfırla - lap / reset (GND'ye / to GND)
8
9bool running = false;
10unsigned long startedAt = 0;          // son başlatma anı / last start moment
11unsigned long stored = 0;             // durdurulmuş süre / time accumulated while stopped
12unsigned long lastShow = 0;
13bool lastStart = HIGH, lastLap = HIGH;
14unsigned long lastPress = 0;          // son kabul edilen basış / last accepted press
15
16unsigned long elapsed() {
17  return running ? stored + (millis() - startedAt) : stored;
18}
19
20// ms değerini "dd:ss.cc" olarak yaz / print ms as "mm:ss.cc"
21void printTime(unsigned long ms) {
22  unsigned long cs = ms / 10;
23  char buf[12];
24  snprintf(buf, sizeof(buf), "%02lu:%02lu.%02lu", (cs / 6000) % 100, (cs / 100) % 60, cs % 100);
25  lcd.print(buf);
26}
27
28void setup() {
29  pinMode(START_BTN, INPUT_PULLUP);
30  pinMode(LAP_BTN, INPUT_PULLUP);
31  lcd.init();
32  lcd.backlight();
33  lcd.setCursor(0, 0);
34  lcd.print(F("Sure  "));
35  printTime(0);
36  lcd.setCursor(0, 1);
37  lcd.print(F("Tur   --:--.--"));
38}
39
40void loop() {
41  bool s = digitalRead(START_BTN), l = digitalRead(LAP_BTN);
42
43  bool ready = millis() - lastPress > 200;         // 200 ms içinde ikinci basışı yok say / ignore bounces within 200 ms
44  if (ready && s == LOW && lastStart == HIGH) {    // başlat/durdur kenarı / start-stop edge
45    lastPress = millis();
46    if (running) { stored = elapsed(); running = false; }
47    else { startedAt = millis(); running = true; }
48  }
49  if (ready && l == LOW && lastLap == HIGH) {      // tur ya da sıfırla / lap or reset
50    lastPress = millis();
51    lcd.setCursor(6, 1);
52    if (running) {
53      printTime(elapsed());                        // çalışırken: tur zamanı / running: lap time
54    } else {
55      stored = 0;                                  // dururken: sıfırla / stopped: reset
56      lcd.print(F("--:--.--"));
57    }
58  }
59  lastStart = s;
60  lastLap = l;
61
62  if (millis() - lastShow >= 50) {                 // saniyede 20 kez yenile / refresh 20 times per second
63    lastShow = millis();
64    lcd.setCursor(6, 0);
65    printTime(elapsed());
66  }
67}

The code has three important ideas. First, the stopwatch doesn't use delay(); time is calculated with millis(), so button presses aren't missed while the display updates. Second, every 50 ms only the eight-character section that changes is redrawn; if lcd.clear() were called every loop, the display would flicker visibly. Third, snprintf() always prints the time at the same width (00:00.00), so old digits never linger. Because the Arduino Uno's clock source is a ceramic resonator, you may see drift of up to a few seconds per hour on long measurements; for timing over hours an RTC module is more accurate.

Bar graph with custom characters (project 15)

The HD44780 chip stores up to 8 characters that you draw yourself. This sketch creates five characters with 1, 2, 3, 4 and 5 columns filled from the left. Each cell is 5 columns wide, so a 16-cell line shows an 80-step bar; as you turn the potentiometer, the bar grows one column at a time. Connect the potentiometer's outer legs to 5V and GND and its middle leg to A0.

C++ (Arduino IDE)
1// Proje 15: Özel karakterlerle çubuk grafik / Bar graph with custom characters
2#include <Wire.h>
3#include <LiquidCrystal_I2C.h>
4
5LiquidCrystal_I2C lcd(0x27, 16, 2);
6const int POT_PIN = A0;               // potansiyometre orta bacak / pot wiper
7
8void makeBars() {
9  for (int cols = 1; cols <= 5; cols++) {          // 1-5 sütunu dolu 5 karakter / 5 chars with 1-5 filled columns
10    byte rows[8];
11    byte pattern = (byte)(0x1F << (5 - cols)) & 0x1F;  // soldan doldur / fill from the left
12    for (int r = 0; r < 8; r++) rows[r] = pattern;
13    lcd.createChar(cols - 1, rows);                // karakter 0-4 / characters 0-4
14  }
15}
16
17void setup() {
18  lcd.init();
19  lcd.backlight();
20  makeBars();
21}
22
23void loop() {
24  int raw = analogRead(POT_PIN);
25  int level = map(raw, 0, 1023, 0, 80);            // 16 hücre x 5 sütun = 80 adım / 16 cells x 5 columns = 80 steps
26
27  lcd.setCursor(0, 0);
28  lcd.print(F("Seviye "));
29  lcd.print(raw * 100L / 1023);
30  lcd.print(F(" %   "));
31
32  lcd.setCursor(0, 1);
33  for (int cell = 0; cell < 16; cell++) {
34    int fill = level - cell * 5;                   // bu hücreye düşen sütun / columns for this cell
35    if (fill >= 5) lcd.write(byte(4));             // tam dolu / full
36    else if (fill > 0) lcd.write(byte(fill - 1));  // kısmen dolu / partly filled
37    else lcd.print(' ');                           // boş / empty
38  }
39  delay(50);
40}

LCD with the ESP32: Wi-Fi network scanner

On the ESP32 the default I2C pins are GPIO 21 (SDA) and GPIO 22 (SCL); the line Wire.begin(21, 22) states this explicitly and lets you move them to other pins if you want. Power the LCD with 5 V from the VIN pin and don't forget the level note in the warning above. This small sketch shows, without any password, the names and signal strengths in dBm of the two strongest Wi-Fi networks nearby: -50 dBm is very good, -70 dBm acceptable and -85 dBm the edge where connections drop. It makes a handy pocket tool when deciding where to put the router or an ESP32 sensor.

C++ (Arduino IDE)
1// ESP32: en güçlü Wi-Fi ağlarını LCD'de göster / show the strongest Wi-Fi networks on the LCD
2#include <WiFi.h>
3#include <Wire.h>
4#include <LiquidCrystal_I2C.h>
5
6LiquidCrystal_I2C lcd(0x27, 16, 2);
7
8void setup() {
9  Wire.begin(21, 22);                 // SDA = GPIO 21, SCL = GPIO 22
10  lcd.init();
11  lcd.backlight();
12  WiFi.mode(WIFI_STA);
13  WiFi.disconnect();
14}
15
16void loop() {
17  lcd.clear();
18  lcd.print(F("Taraniyor..."));      // scanning
19  int n = WiFi.scanNetworks();        // ağlar güçlüden zayıfa sıralı gelir / sorted strongest first
20  lcd.clear();
21  if (n <= 0) {
22    lcd.print(F("Ag yok / no WiFi"));
23  }
24  for (int i = 0; i < n && i < 2; i++) {          // ilk iki ağ / first two networks
25    lcd.setCursor(0, i);
26    String name = WiFi.SSID(i).substring(0, 11);  // 11 karakter ad / 11-char name
27    lcd.print(name);
28    lcd.setCursor(12, i);
29    lcd.print(WiFi.RSSI(i));                      // dBm, ör. -54 / e.g. -54
30  }
31  WiFi.scanDelete();
32  delay(5000);
33}

LCD with the Raspberry Pi Pico (MicroPython)

There are ready-made LCD driver files for MicroPython, but the code below needs no extra file: it includes a small 30-line class that drives the HD44780 in 4-bit mode through the PCF8574. The example reads the Pico's internal temperature sensor and prints it. That sensor measures the chip's own temperature, so it can differ from the room by a few degrees; use an external sensor for a real thermometer. Power the LCD from VBUS and connect SDA to GP4 and SCL to GP5.

MicroPython
1# Pico: dahili sıcaklık sensörünü I2C LCD'de göster / show the internal temperature on an I2C LCD
2from machine import I2C, Pin, ADC
3import time
4
5class I2cLcd:                         # PCF8574 arka kartlı HD44780 / HD44780 with a PCF8574 backpack
6    def __init__(self, i2c, addr=0x27):
7        self.i2c, self.addr, self.bl = i2c, addr, 0x08
8        time.sleep_ms(50)
9        for n in (0x03, 0x03, 0x03, 0x02):   # 4 bit moda geç / switch to 4-bit mode
10            self._nibble(n << 4, 0)
11            time.sleep_ms(5)
12        for c in (0x28, 0x0C, 0x06, 0x01):   # 2 satır, ekran açık, imleç ileri, temizle / 2 lines, on, entry, clear
13            self._byte(c, 0)
14        time.sleep_ms(2)
15
16    def _nibble(self, data, rs):
17        b = (data & 0xF0) | self.bl | rs
18        self.i2c.writeto(self.addr, bytes([b | 0x04, b]))   # E darbesi / E pulse
19
20    def _byte(self, data, rs):
21        self._nibble(data & 0xF0, rs)
22        self._nibble((data << 4) & 0xF0, rs)
23
24    def move(self, col, row):
25        self._byte(0x80 | (col + (0x40 if row else 0)), 0)
26
27    def text(self, s):
28        for ch in s:
29            self._byte(ord(ch), 1)
30
31lcd = I2cLcd(I2C(0, sda=Pin(4), scl=Pin(5), freq=100000))
32sensor = ADC(4)                       # Pico'nun dahili sıcaklık kanalı / Pico's internal temperature channel
33
34while True:
35    v = sensor.read_u16() * 3.3 / 65535
36    temp = 27 - (v - 0.706) / 0.001721  # veri sayfasındaki formül / datasheet formula
37    lcd.move(0, 0)
38    lcd.text("Pico sicaklik   ")
39    lcd.move(0, 1)
40    lcd.text("{:5.1f} C        ".format(temp))
41    time.sleep(1)

Common LCD problems and fixes

SymptomCauseFix
Only boxes on the top lineContrast not set or lcd.init() didn't runTurn the trimmer; if the address and wires are right, check the init() line
Backlight on but no textWrong I2C addressFind the address with the I2C scanner, try 0x3F instead of 0x27
The display flickers constantlylcd.clear() is called every loopWrite only the part that changes, don't use clear()
An old digit stays at the end when the number shrinksThe new value is shorter than the old onePrint the value at a fixed width or add spaces after it
Garbage characters appearLoose parallel wires or accented letters usedCheck the wires; define custom characters for special letters
The display doesn't work at all on the ESP32Wrong pins or the LCD is powered from 3.3 VUse Wire.begin(21, 22) and power the LCD with 5 V from VIN
The LCD's character table contains basic Latin letters, digits and a set of Japanese characters, but most accented letters are missing; if you try to print é, à or ñ you may see strange symbols. The easiest fix is to simplify the text. If you really need special letters, you can draw up to 8 of them yourself with createChar(); it's the same method used in the bar graph sketch.

Most projects on this list are ready in the BlueGrays app: you can build printing messages on an LCD, the NTC thermometer, the distance meter, the RTC clock, the keypad lock, the calculator, the runner game and the ESP32 LCD projects step by step, each with a circuit diagram and commented code.

Frequently asked questions

How do you connect an LCD to Arduino?

On an LCD with an I2C backpack you just connect GND to GND, VCC to 5V, SDA to A4 and SCL to A5. Then you install the LiquidCrystal_I2C library and set the address to 0x27 or 0x3F. An LCD without a backpack needs 6 pins for RS, E and D4-D7 plus a potentiometer for contrast.

Why does my LCD only show boxes?

Boxes mean the display has power but the contrast is wrong or the display hasn't been initialised. First turn the trimmer on the back of the I2C backpack until text appears. If the problem continues, check the I2C address with a scanner sketch and make sure your code has an lcd.init() or lcd.begin() line.

Is the I2C LCD address 0x27 or 0x3F?

Backpacks with the PCF8574T chip default to 0x27 and those with the PCF8574AT to 0x3F. The address can be changed with the A0, A1 and A2 solder jumpers on the back, so up to 8 displays can share one bus. If you're not sure, an I2C scanner sketch prints the address in the Serial Monitor.

What is the difference between a 16x2 and a 20x4 LCD?

A 16x2 LCD shows 32 characters on two lines and a 20x4 LCD shows 80 characters on four lines. Both use the same driver chip and the same library; in code you only change the number of rows and columns. The 20x4 is ideal for menus and multi-sensor panels, the 16x2 for projects that show a single value.

Can you use a 16x2 LCD with an ESP32?

Yes. Connect the I2C LCD's SDA to GPIO 21 and SCL to GPIO 22 and power the display with 5 V from the VIN pin. Because the backpack's pull-ups pull the lines to 5 V, the safest way is to use a logic level converter. The library and code are the same as on the Arduino.

How do you show special or accented characters on an LCD?

The built-in table of character LCDs lacks most accented letters such as é, à or ñ. With the createChar() function you can define up to 8 custom 5 x 8 dot characters and draw the letters you need yourself. If you need more, simplifying the text or moving to a graphic OLED display is more practical.

See all projects
Using LCD Screen with I2C
AR-32Beginner
Premium

Using LCD Screen with I2C

Give your Arduino its own screen and make it write its first message. The two-line LCD screen hooks up with just a few wires; a greeting appears on the top line, then a second message on the bottom…

4.8(53)
71
Print Message on 2x16 LCD Screen
AR-29Advanced
Premium

Print Message on 2x16 LCD Screen

Your first step to writing text on a screen. The two-line LCD screen first shows a waiting message, then writes a greeting on the top line and types a word letter by letter on the bottom line like a…

4.6(37)
51
Measuring Distance Using LCD Display
AR-31Advanced
Premium

Measuring Distance Using LCD Display

A tool that measures distance without a ruler: move your hand back and forth in front of the sensor and watch the number change.

4.6(45)
59
Temperature Measurement with NTC and 2x16 Lcd Display
AR-44Beginner
Premium

Temperature Measurement with NTC and 2x16 Lcd Display

Measure the temperature around you with a sensor that looks like a tiny bead. This part, called an NTC, lets electricity through more easily as it warms up; the Arduino reads that change, turns it…

4.5(33)
44
DS1302 RTC Clock with LCD Display
AR-46Intermediate
Premium

DS1302 RTC Clock with LCD Display

A little desk clock that keeps the time even when the power goes out. The DS1302 clock module keeps time thanks to its own tiny battery; every second the Arduino reads it and writes the time and date…

4.7(41)
51
Password Lock with 4x4 Keypad and LCD
AR-64Advanced
Premium

Password Lock with 4x4 Keypad and LCD

A small electronic door lock that keeps out anyone who doesn't know the code. You press the hash key and type the code on the keypad; if it is right, the screen says access granted, the green LED…

4.8(59)
75
Arduino LCD Runner Game
AR-96Intermediate
Premium

Arduino LCD Runner Game

Side scrolling endless runner game running on 16x2 character LCD screen. Hero runs automatically, player jumps over obstacles by pressing the button. Random obstacles appear on the top and bottom row. Passive buzzer plays opening melody, jumping sound, 50 point celebration sound and end of game melody. "BlueGrays - Arduino Projects" splash screen is shown on startup. The score is updated instantly in the upper right corner of the screen.

4.6(32)
56
ESP32 I2C LCD Display (16x2)
ES-17Intermediate
Premium

ESP32 I2C LCD Display (16x2)

In this project we connect a 16x2 character LCD to the ESP32 over I2C and display text. With I2C, just 2 data pins (SDA and SCL) control the screen, instead of the 6+ pins a classic parallel connection wastes. The code prints a fixed message on the first line and a counter that goes up every second on the second. At startup an I2C scanner also prints the display's address to the Serial Monitor (usually 0x27 or 0x3F).

4.9(23)
40