Arduino UNO Q - LCD 20x4

This tutorial shows you how to use an LCD 20x4 I2C display with Arduino UNO Q — from basic text to custom characters, scrolling, and remote Telegram control.

Arduino UNO Q - LCD 20x4

Hardware Preparation

1×Arduino UNO Q
1×USB Cable for Arduino Uno Q
1×LCD 20x4 I2C
1×Jumper Wires
1×Recommended: Screw Terminal Block Shield for Arduino Uno
1×Recommended: Sensors/Servo Expansion Shield for Arduino Uno
1×Recommended: Breadboard Shield for Arduino Uno
1×Recommended: Enclosure for Arduino Uno
1×Recommended: Prototyping Base Plate & Breadboard Kit for Arduino UNO

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables .

Buy Note: Alternatively, you can assemble the LCD I2C display using LCD 1602 Display and PCF8574 I2C Adapter Module.

Overview of LCD I2C 20x4

LCD 20x4 I2C has 20 columns and 4 rows — twice as many rows as the 16x2, making it useful for dashboards, menus, and multi-line status displays. Like the 16x2, it uses an I2C backpack for easy 4-wire connection.

The LCD Pinout

The LCD I2C has four pins:

  • GND — connect to GND
  • VCC — connect to 5V
  • SDA — I2C data signal
  • SCL — I2C clock signal
LCD I2C pinout

LCD Coordinate

The LCD I2C 20x4 has 20 columns and 4 rows, numbered starting from 0.

Arduino UNO Q LCD 20x4 coordinate

Wiring Diagram

The wiring diagram between Arduino UNO Q LCD 20x4

This image is created using Fritzing. Click to enlarge image

LCD I2C PinArduino UNO Q Pin
GNDGND
VCC5V
SDASDA
SCLSCL

※ NOTE THAT:

The I2C address may differ depending on the manufacturer. We use 0x27 as specified by DIYables. If 0x27 does not work, try 0x3F.

How To Program For LCD I2C 20x4

The DIYables_LCD_I2C library works for both 16x2 and 20x4 — just change the column and row count.

  • Create the LCD object for 20x4:
DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows
  • Initialize in setup():
lcd.init(); lcd.backlight();
  • Move cursor and print (rows 0–3):
lcd.setCursor(0, 0); // column 0, row 0 lcd.print("Row 0 text here"); lcd.setCursor(0, 3); // column 0, row 3 lcd.print("Row 3 text here");

See the LCD I2C tutorial for additional features such as custom characters and troubleshooting tips.

Arduino UNO Q Code — Hello World on LCD 20x4

The Arduino UNO Q has two processors: the STM32 MCU (handles real-time hardware control) and the Qualcomm MPU (runs Debian Linux). In this section, only the STM32 MCU is programmed — the Linux side stays idle. A later section will show how both processors work together.

The sketch below displays text on all four rows of the LCD.

/* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows void setup() { Monitor.begin(9600); lcd.init(); // Initialize the LCD lcd.backlight(); // Turn on the backlight lcd.setCursor(0, 0); lcd.print("Hello, World!"); lcd.setCursor(0, 1); lcd.print("Arduino UNO Q"); lcd.setCursor(0, 2); lcd.print("LCD 20x4 I2C"); lcd.setCursor(0, 3); lcd.print("DIYables.io"); Monitor.println("LCD 20x4 Hello World done"); } void loop() {}

Detailed Instructions

  • First time with Arduino UNO Q? Follow the Getting Started with Arduino UNO Q tutorial to get your development environment ready before proceeding.
  • Wire the LCD: Connect VCC→5V, GND→GND, SDA→SDA, SCL→SCL.
  • Connect: Plug the Arduino UNO Q into your computer with a USB-C cable.
  • Open Arduino App Lab: Launch Arduino App Lab and wait until it detects your Arduino UNO Q.
  • Create a new App: Click the Create New App button.
Create New App in Arduino App Lab on Arduino UNO Q
  • Give the App a name, for example: DIYables_LCD_20x4
  • Click Create to confirm.
  • You will see a set of folders and files generated inside your new App.
Arduino App Lab App folders and files on Arduino UNO Q
  • Find the sketch/sketch.ino file — this is where you will paste the MCU sketch.
  • Paste the sketch: Copy the MCU code above and paste it into the sketch file.
    • Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.
    Add sketch library in Arduino App Lab on Arduino UNO Q
    • Search for Arduino_RouterBridge created by Arduino and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    Arduino_RouterBridge Arduino

    This library provides a simple RPC bridge for Arduino UNO Q boards, allowing communication between the board and other devices using MsgPack serialization.

    0.4.1
    Install
    More Info
    • Search for DIYables LCD I2C created by DIYables.io and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    DIYables LCD I2C DIYables.io

    This library is designed for HD44780-based I2C LCD displays. It provides LiquidCrystal-compatible API plus helper functions (text alignment, progress bars, predefined custom characters). Supports multiple I2C buses (Wire, Wire1, Wire2) for advanced boards like Arduino Giga, Due, and ESP32. Compatible with all Arduino-based platforms including Arduino Uno, Mega, Nano, ESP32, ESP8266, STM32, and Raspberry Pi Pico.

    1.0.0
    Install
    More Info
    • Upload: Click the Run button in Arduino App Lab to compile and upload to the STM32.
    Click Run button in Arduino App Lab on Arduino UNO Q

    Look at the LCD — all four rows display text: "Hello, World!", "Arduino UNO Q", "LCD 20x4 I2C", and "DIYables.io"!

    ※ NOTE THAT:

    If the LCD shows nothing or only black squares, adjust the contrast potentiometer on the I2C backpack. See Troubleshooting LCD I2C for more help.

    Arduino UNO Q Code — Display Text and Numbers on LCD 20x4

    This example shows how to display a plain text string, an integer, a float, and a hexadecimal number — one on each row.

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows void setup() { Monitor.begin(9600); lcd.init(); lcd.backlight(); // Row 0: plain text string lcd.setCursor(0, 0); lcd.print("Text: Arduino UNO Q"); // Row 1: integer int count = 2025; lcd.setCursor(0, 1); lcd.print("Int: "); lcd.print(count); // Row 2: float (2 decimal places) float voltage = 3.14; lcd.setCursor(0, 2); lcd.print("Float:"); lcd.print(voltage, 2); // Row 3: hexadecimal int value = 255; lcd.setCursor(0, 3); lcd.print("Hex: 0x"); lcd.print(value, HEX); Monitor.println("LCD 20x4 text demo done"); } void loop() {}

    Detailed Instructions

    • Copy the code above and paste it into sketch/sketch.ino.
    • Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    The LCD shows text on row 0, an integer on row 1, a float on row 2, and a hex number on row 3.

    Useful LCD Functions Reference

    Quick reference for commonly-used DIYables_LCD_I2C functions:

    • lcd.init() — initialize the LCD
    • lcd.backlight() — turn on the backlight
    • lcd.noBacklight() — turn off the backlight
    • lcd.setCursor(col, row) — move the cursor to column *col*, row *row* (both 0-based)
    • lcd.print("text") — print a string at the current cursor position
    • lcd.print(number) — print an integer
    • lcd.print(number, HEX) — print an integer in hexadecimal
    • lcd.print(floatVal, decimals) — print a float with the specified number of decimal places
    • lcd.clear() — clear the display and move cursor to (0, 0)
    • lcd.home() — move cursor to (0, 0) without clearing
    • lcd.createChar(id, array) — register a custom character (id 0–7)
    • lcd.write((byte)id) — display a registered custom character
    • lcd.scrollDisplayLeft() — shift all content one column to the left
    • lcd.scrollDisplayRight() — shift all content one column to the right
    • lcd.cursor() — show the underscore cursor
    • lcd.noCursor() — hide the cursor
    • lcd.blink() — show the blinking block cursor
    • lcd.noBlink() — stop the blinking block cursor

    Arduino UNO Q Code — Custom Characters on LCD 20x4

    The LCD 20x4 can store up to 8 custom characters (IDs 0–7). Each character is defined as an 8-row × 5-column bitmap stored in a byte array. Define the arrays, register them with lcd.createChar(), then display them using lcd.write().

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows // Custom character 0: heart byte heart[8] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000, 0b00000 }; // Custom character 1: smiley face byte smiley[8] = { 0b00000, 0b01010, 0b01010, 0b00000, 0b10001, 0b01110, 0b00000, 0b00000 }; // Custom character 2: music note byte note[8] = { 0b00100, 0b00110, 0b00101, 0b00101, 0b00100, 0b11100, 0b11100, 0b00000 }; // Custom character 3: arrow up byte arrowUp[8] = { 0b00100, 0b01110, 0b11111, 0b00100, 0b00100, 0b00100, 0b00100, 0b00000 }; void setup() { Monitor.begin(9600); lcd.init(); lcd.backlight(); // Register custom characters (slots 0–3) lcd.createChar(0, heart); lcd.createChar(1, smiley); lcd.createChar(2, note); lcd.createChar(3, arrowUp); // Row 0: label + heart lcd.setCursor(0, 0); lcd.print("Heart: "); lcd.write((byte)0); // Row 1: label + smiley lcd.setCursor(0, 1); lcd.print("Smiley: "); lcd.write((byte)1); // Row 2: label + note lcd.setCursor(0, 2); lcd.print("Note: "); lcd.write((byte)2); // Row 3: label + arrow up lcd.setCursor(0, 3); lcd.print("Arrow up: "); lcd.write((byte)3); Monitor.println("LCD 20x4 custom characters done"); } void loop() {}

    Detailed Instructions

    • Copy the code above and paste it into sketch/sketch.ino.
    • Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    The LCD displays four rows, each labeled with the custom character shown at the end: heart, smiley, music note, and arrow.

    ※ NOTE THAT:

    To design your own characters, use the LCD Custom Character Generator — it lets you draw the pixel pattern and outputs the byte array ready for your code.

    Arduino UNO Q Code — Scrolling Text on LCD 20x4

    scrollDisplayLeft() and scrollDisplayRight() shift the entire display content by one column per call — all four rows move together. Use a loop with a short delay to create a smooth scrolling effect.

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows void setup() { Monitor.begin(9600); lcd.init(); lcd.backlight(); // Write text on all 4 rows lcd.setCursor(0, 0); lcd.print("Scroll Left >>>>>"); lcd.setCursor(0, 1); lcd.print("Row 1 scrolling..."); lcd.setCursor(0, 2); lcd.print("Row 2 scrolling..."); lcd.setCursor(0, 3); lcd.print("<<< Scroll Right"); delay(1000); // Scroll entire display left 20 steps Monitor.println("Scrolling left..."); for (int i = 0; i < 20; i++) { lcd.scrollDisplayLeft(); delay(300); } delay(500); // Scroll entire display right 20 steps (back to original) Monitor.println("Scrolling right..."); for (int i = 0; i < 20; i++) { lcd.scrollDisplayRight(); delay(300); } Monitor.println("LCD 20x4 scroll demo done"); } void loop() {}

    Detailed Instructions

    • Copy the code above and paste it into sketch/sketch.ino.
    • Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    The LCD content slides left 20 steps, pauses, then slides right 20 steps back to the original position.

    Arduino UNO Q Code — Backlight Control on LCD 20x4

    Use lcd.backlight() to turn on the I2C backpack's backlight LED and lcd.noBacklight() to turn it off. This demo cycles through on → off → on → blink pattern.

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows void setup() { Monitor.begin(9600); lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print("Backlight ON"); lcd.setCursor(0, 1); lcd.print("Arduino UNO Q"); lcd.setCursor(0, 2); lcd.print("LCD 20x4 I2C"); lcd.setCursor(0, 3); lcd.print("DIYables.io"); Monitor.println("Backlight ON"); delay(2000); // Turn off backlight lcd.noBacklight(); Monitor.println("Backlight OFF"); delay(2000); // Turn backlight back on lcd.backlight(); Monitor.println("Backlight ON again"); delay(2000); // Blink the backlight 5 times Monitor.println("Blinking backlight..."); for (int i = 0; i < 5; i++) { lcd.noBacklight(); delay(500); lcd.backlight(); delay(500); } Monitor.println("LCD 20x4 backlight demo done"); } void loop() {}

    Detailed Instructions

    • Copy the code above and paste it into sketch/sketch.ino.
    • Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    Watch the LCD backlight turn on, then off, then on again, and finally blink five times.

    Linux + MCU Bridge Programming

    The Arduino UNO Q has two processors that work together: the MPU (Qualcomm, runs Debian Linux) and the MCU (STM32, runs Zephyr OS with your Arduino sketch). They communicate using RPC via the Arduino_RouterBridge library — never via raw serial ports.

    • The LCD is connected to the MCU (STM32) — via I2C (SDA/SCL). Only the MCU can directly write to it.
    • The MPU cannot control the LCD directly — it calls MCU functions like Bridge.call("set_line1", "text") to update each row.
    • The MPU has Wi-Fi — because the MPU runs full Debian Linux with Wi-Fi, it can receive Telegram commands and display any message on the LCD remotely.
    • Communication: Bridge.call() on the Linux side invokes Bridge.provide_safe() functions on the MCU side (since LCD writes are hardware API calls).
    • ⚠️ Reserved: /dev/ttyHS1 (Linux) and Serial1 (MCU) are used by the Arduino Router — never open them directly.

    In short: MPU sends text via Bridge → MCU writes to LCD row → MCU prints result to Monitor.

    MCU sketch — LCD 20x4 with Bridge and Monitor output:

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ #include "Arduino_RouterBridge.h" #include <DIYables_LCD_I2C.h> DIYables_LCD_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 columns, 4 rows String lines[4] = {"", "", "", ""}; void set_line1(String text) { lines[0] = text.substring(0, 20); lcd.setCursor(0, 0); lcd.print(" "); // Clear row 0 lcd.setCursor(0, 0); lcd.print(lines[0]); Monitor.println("Row0: " + lines[0]); } void set_line2(String text) { lines[1] = text.substring(0, 20); lcd.setCursor(0, 1); lcd.print(" "); // Clear row 1 lcd.setCursor(0, 1); lcd.print(lines[1]); Monitor.println("Row1: " + lines[1]); } void set_line3(String text) { lines[2] = text.substring(0, 20); lcd.setCursor(0, 2); lcd.print(" "); // Clear row 2 lcd.setCursor(0, 2); lcd.print(lines[2]); Monitor.println("Row2: " + lines[2]); } void set_line4(String text) { lines[3] = text.substring(0, 20); lcd.setCursor(0, 3); lcd.print(" "); // Clear row 3 lcd.setCursor(0, 3); lcd.print(lines[3]); Monitor.println("Row3: " + lines[3]); } void clear_lcd() { for (int i = 0; i < 4; i++) lines[i] = ""; lcd.clear(); Monitor.println("LCD cleared"); } void get_status() { Monitor.println("R0: " + lines[0]); Monitor.println("R1: " + lines[1]); Monitor.println("R2: " + lines[2]); Monitor.println("R3: " + lines[3]); } void setup() { Bridge.begin(); Monitor.begin(); lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print("Bridge Ready"); lcd.setCursor(0, 1); lcd.print("Waiting..."); Bridge.provide_safe("set_line1", set_line1); Bridge.provide_safe("set_line2", set_line2); Bridge.provide_safe("set_line3", set_line3); Bridge.provide_safe("set_line4", set_line4); Bridge.provide_safe("clear_lcd", clear_lcd); Bridge.provide("get_status", get_status); Monitor.println("LCD 20x4 Bridge ready"); } void loop() {}

    Python script (Arduino App Lab) — display text on LCD 20x4 from Linux:

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ from arduino.app_utils import * import time def loop(): Bridge.call("set_line1", "Arduino UNO Q") Bridge.call("set_line2", "LCD 20x4 Bridge") Bridge.call("set_line3", "DIYables.io") Bridge.call("set_line4", "Python running...") time.sleep(3) Bridge.call("clear_lcd") time.sleep(1) Bridge.call("set_line1", "Line 1 update") Bridge.call("set_line2", "Line 2 update") result = Bridge.call("get_status") print(result) time.sleep(3) App.run(user_loop=loop)

    Detailed Instructions

    • Create a new App: Open Arduino App Lab, click Create New App, name it DIYables_LCD_20x4_Bridge, and click Create.
    • Paste the MCU sketch: Copy the Bridge MCU code above and paste it into sketch/sketch.ino.
    • Paste the Python script: Copy the Python code above and paste it into the Python file in the App.
    • Run the App: Click the Run button — the Python side updates all four LCD rows, then clears and updates again.

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    Message (Enter to send a message to "Newbiely" on usb(2820070321))
    New Line
    9600 baud
    LCD 20x4 Bridge ready Row0: Arduino UNO Q Row1: LCD 20x4 Bridge Row2: DIYables.io Row3: Python running... LCD cleared Row0: Line 1 update Row1: Line 2 update R0: Line 1 update R1: Line 2 update R2: R3:

    Telegram Integration

    Control your LCD 20x4 remotely — send any text to any row from anywhere via Telegram.

    If you do not have a Telegram bot yet, see How to Create a Telegram Bot to get your bot token before continuing.

    MCU sketch: Keep the same MCU sketch from the previous Bridge section — no changes needed. Make sure it is already uploaded and running on the STM32 before proceeding.

    Python script (Arduino App Lab) — Telegram bot for LCD 20x4:

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-lcd-20x4 */ from arduino.app_utils import * import requests import time BOT_TOKEN = "YOUR_BOT_TOKEN" API_URL = f"https://api.telegram.org/bot{BOT_TOKEN}" last_update_id = 0 def send_message(chat_id, text): requests.post(f"{API_URL}/sendMessage", json={"chat_id": chat_id, "text": text}) def get_updates(): global last_update_id resp = requests.get(f"{API_URL}/getUpdates", params={"offset": last_update_id + 1, "timeout": 5}) return resp.json().get("result", []) def loop(): global last_update_id updates = get_updates() for update in updates: last_update_id = update["update_id"] msg = update.get("message", {}) chat_id = msg.get("chat", {}).get("id") text = msg.get("text", "").strip() if text.startswith("/row1 "): result = Bridge.call("set_line1", text[6:]) send_message(chat_id, result) elif text.startswith("/row2 "): result = Bridge.call("set_line2", text[6:]) send_message(chat_id, result) elif text.startswith("/row3 "): result = Bridge.call("set_line3", text[6:]) send_message(chat_id, result) elif text.startswith("/row4 "): result = Bridge.call("set_line4", text[6:]) send_message(chat_id, result) elif text == "/clear": result = Bridge.call("clear_lcd") send_message(chat_id, result) elif text == "/status": result = Bridge.call("get_status") send_message(chat_id, result) else: send_message(chat_id, "Commands:\n/row1 <text>\n/row2 <text>\n/row3 <text>\n/row4 <text>\n/clear\n/status") App.run(user_loop=loop)
    • Note: Replace YOUR_BOT_TOKEN with the token obtained from @BotFather on Telegram.
    • Send /row1 Hello — displays "Hello" on row 1.
    • Send /row2 World — displays "World" on row 2.
    • Send /clear — clears the entire LCD.
    • Send /status — returns the current content of all 4 rows.

    Detailed Instructions

    • Upload the MCU sketch: Use the Bridge MCU sketch from the previous section.
    • Paste the Telegram script: Copy the Python code above into the Python tab.
    • Set your token: Replace YOUR_BOT_TOKEN with your actual bot token.
    • Run the App: Click Run — the bot listens for Telegram commands.
    • Test it: Send /row1 Arduino UNO Q — that text should appear on the LCD's first row.

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 12:00:01] Telegram: /row1 Arduino UNO Q [2026-04-29 12:00:01] Row0: Arduino UNO Q [2026-04-29 12:01:10] Telegram: /row3 DIYables.io [2026-04-29 12:01:10] Row2: DIYables.io [2026-04-29 12:02:00] Telegram: /status [2026-04-29 12:02:00] R0: Arduino UNO Q | R1: | R2: DIYables.io | R3: [2026-04-29 12:03:15] Telegram: /clear [2026-04-29 12:03:15] LCD cleared
    Telegram
    Telegram 12:45
    Welcome to Telegram!
    ArduinoBot 10:19
    Chatting with Arduino...
    telegram-botfather
    BotFather Yesterday
    Your bot has been created.

    ArduinoBot

    bot
    Today
    /row1 Arduino UNO Q
    10:15 AM ✓✓
    Row0: Arduino UNO Q
    10:16 AM
    /row3 DIYables.io
    10:17 AM ✓✓
    Row2: DIYables.io
    10:18 AM
    /status
    10:19 AM ✓✓
    R0: Arduino UNO Q R1: R2: DIYables.io R3:
    10:20 AM
    /clear
    10:21 AM ✓✓
    LCD cleared
    10:22 AM

    OpenClaw Integration

    OpenClaw integration for Arduino UNO Q LCD 20x4 is coming soon.

    • Coming Soon: OpenClaw support for LCD 20x4 control on Arduino UNO Q will be covered in a future update.

    Application/Project Ideas

    • 4-row sensor dashboard: Display temperature, humidity, pressure, and battery level simultaneously on all four rows
    • Network status board: Show IP address, connected devices, uptime, and last event on dedicated rows
    • Lab equipment display: Use the 20x4 to show multi-channel sensor readings in a compact format
    • Countdown timer board: Show a large-format timer using all 4 rows for easy reading across a room
    • Remote notice board: Use Telegram to push 4-line announcements to an LCD on a wall or desk

    Challenge Yourself

    • Easy: Modify the /status reply to format the 4 rows as Row 1: text | Row 2: text | Row 3: text | Row 4: text in a single message
    • Medium: Add a /display <text> command that auto-wraps long text across up to 4 rows of 20 characters each
    • Advanced: Implement a scrolling ticker using lcd.scrollDisplayLeft() that shows a long message from Telegram across all 4 rows

    ※ OUR MESSAGES

    • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
    • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!