Arduino UNO Q - DHT11 - LCD
Combine the DHT11 humidity and temperature sensor with a 16x2 I2C LCD on Arduino UNO Q for a clear, at-a-glance environment monitor. Add Bridge and Telegram for remote monitoring and alerts.
In this tutorial, you will learn:
- What the DHT11 sensor is and how it works with an LCD display
- How to wire the DHT11 and 16x2 I2C LCD to the Arduino UNO Q MCU
- How to program the MCU (C/C++ Arduino code) to read DHT11 and display data on the LCD
- How to program both the Linux side (Python) and MCU side (C/C++) to read sensor data via Bridge
- How to receive Telegram alerts when temperature or humidity exceeds thresholds on Arduino UNO Q
- How to use OpenClaw on Arduino UNO Q with the DHT11 and LCD

Hardware Preparation
Or you can buy the following kits:
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
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 the DHT11 Sensor
Pinout
The DHT11 has four pins (when using the common 3-pin module):
- GND: Connect to GND
- VCC: Connect to 3.3V or 5V
- DATA: Connect to digital pin 2 on the Arduino UNO Q MCU

How It Works
The DHT11 uses a single-wire digital protocol to transmit humidity and temperature. It can measure:
- Humidity: 20–80% RH (±5% accuracy)
- Temperature: 0–50°C (±2°C accuracy)
Allow at least 3 seconds between readings.
Overview of the LCD Display
The 16x2 I2C LCD connects via I2C and displays two rows of 16 characters. The top row shows temperature (°C and °F) and the bottom row shows humidity. Default I2C address: 0x27.
Wiring Diagram

This image is created using Fritzing. Click to enlarge image
DHT11 to Arduino UNO Q MCU:
| DHT11 Pin | Arduino UNO Q MCU |
|---|---|
| GND | GND |
| VCC | 3.3V |
| DATA | D2 |
LCD I2C to Arduino UNO Q MCU:
| LCD Pin | Arduino UNO Q MCU |
|---|---|
| GND | GND |
| VCC | 5V |
| SDA | SDA |
| SCL | SCL |
How To Program For DHT11 + LCD
- Include the required libraries:
- Initialize the DHT11 and LCD:
- Read temperature and humidity (wait at least 3 seconds between reads):
- Always check for failed reads:
- Display on LCD:
Arduino UNO Q Code
The Arduino UNO Q has two processors working together:
- The STM32 MCU reads the DHT11 sensor and controls the LCD — all sensor and display logic runs on the MCU
- The Qualcomm MPU runs Debian Linux and handles Wi-Fi, Python, and cloud connectivity
- In this section, only the MCU is programmed — the Linux side stays idle. A later section shows how both processors work together via Bridge.
The MCU reads DHT11 every 3 seconds, displays temperature and humidity on the LCD, and prints to the Serial Monitor.
Detailed Instructions
First time with Arduino UNO Q? Follow the Getting Started with Arduino UNO Q tutorial before proceeding.
- Connect: Wire the DHT11 and LCD to the Arduino UNO Q MCU as shown in the wiring diagram.
- 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.

- Give the App a name, for example: Dht11Lcd
- Click Create to confirm.

- Paste the sketch: Copy the MCU code above and paste it into sketch/sketch.ino. Keep other files as default.
- Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.

- Search for DHT sensor library created by Adafruit and click the Install button.
- Search for DIYables LCD I2C created by DIYables.io and click the Install button.
- Upload: Click the Run button in Arduino App Lab.

- Watch temperature and humidity appear on the LCD and Serial Monitor every 3 seconds.
App Lab Console Output
Bridge: Linux + MCU
This section shows how to program both processors of the Arduino UNO Q so the Linux side can read DHT11 data and control the LCD via Bridge:
- The DHT11 sensor and LCD are connected to the MCU — all reading and display logic runs on the MCU every 3 seconds
- The MPU cannot access the sensor or LCD directly — it calls Bridge functions to retrieve readings or clear the display
- The MPU has Wi-Fi — running full Debian Linux, it can log readings, publish to dashboards, or send Telegram alerts
- Arduino_RouterBridge enables RPC communication between the two processors
- ⚠️ /dev/ttyHS1 (Linux) and Serial1 (MCU) are RESERVED by the router — never open them in user code
In short: MCU reads DHT11 every 3s and updates LCD → MPU reads via Bridge → MPU sends alerts over Wi-Fi.
MCU Code (Bridge)
Python Code (Bridge)
Detailed Instructions
- Connect: Wire the DHT11 and LCD to the Arduino UNO Q as shown in the wiring diagram.
- Open Arduino App Lab: Launch Arduino App Lab and wait for the board to be detected.
- Create a new App: Click Create New App, name it Dht11LcdBridge, then click Create.
- Paste the MCU sketch: Copy the MCU Bridge code above and paste it into sketch/sketch.ino.
- Paste the Python code: Copy the Python Bridge code above and paste it into the Python file in the App.
- Upload: Click the Run button in Arduino App Lab.

- Watch the LCD update every 3 seconds and readings appear in the Python console.
App Lab Console Output
Telegram
Monitor DHT11 readings remotely and receive automatic Telegram alerts when temperature or humidity rises above thresholds.
MCU sketch: Keep the same MCU sketch from the previous Bridge section.
Python Code (Telegram)
Detailed Instructions
- Replace YOUR_TELEGRAM_BOT_TOKEN with your actual bot token from BotFather.
- Replace YOUR_CHAT_ID with your Telegram chat ID.
- Paste this Python code into your App's Python file (keep the same MCU sketch).
- Click the Run button. Send /temp or /humidity from Telegram, or warm the sensor to trigger the high-temperature alert.
App Lab Console Output
ArduinoBot
OpenClaw
You can adapt the OpenClaw to this tutorial by refering the instruction on Arduino Uno Q - OpenClaw Tutorial
Project Ideas
You can build many useful projects with the DHT11 and LCD on Arduino UNO Q:
- Portable Thermometer-Hygrometer: The LCD gives a clear, battery-friendly readout of temperature and humidity — package the project in a small case for a portable climate gauge
- Baby Room Monitor: Mount the device in a nursery — the LCD shows live readings and Telegram alerts parents immediately if temperature or humidity goes outside the comfort zone
- Cold Chain Logger: Use the DHT11 and LCD to track storage conditions — the Python side logs each reading via Bridge to a Linux file with timestamps for later inspection
- Hydroponic Growing Station: Display grow-room temperature and humidity on the LCD and trigger a humidifier relay via Bridge when humidity drops, keeping plant growth conditions optimal
- Lab Environment Tracker: Post the DHT11 readings to an HTTP endpoint every minute using the MPU's Wi-Fi — the LCD confirms current conditions while the dashboard shows historical trends
Challenge Yourself
Ready to go further with the DHT11 and LCD on Arduino UNO Q? Try these challenges:
- Easy: Add a custom Celsius degree character to the LCD using createChar() so the display shows a true ° symbol instead of the nearest printable character.
- Medium: Implement a Telegram /avg command that returns the average temperature and humidity calculated over the last 10 readings buffered by the Python side.
- Advanced: Build a scheduled daily report — every 24 hours, the MPU computes the day's min, max, and average temperature and humidity from Bridge data and sends a formatted summary to Telegram.