The pin-level diagram below matches the firmware's LiquidCrystal constructor and the
DHT22 data lines used in this project. Use it when verifying jumper wires against the sketch—especially
if analog pins are serving as digital I/O.
16×2 LCD pin map
The sketch uses the seven-argument LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) form.
In this build:
- RS → digital pin 8
- RW → digital pin 9
- Enable → analog pin A2 (used as digital output)
- D4–D7 → digital pins 5, 6, 3, and analog pin A3 respectively
Most tutorials tie RW straight to ground and use a six-argument constructor. Wiring RW to pin 9 is less common but valid—it allows the library to read the LCD busy flag instead of blind-writing every character.
Backlight on pin 7
Pin 7 is not an LCD data line. It drives the backlight through a small transistor on the breadboard (visible near the header in the physical build). Switching the backlight separately saves power and lets you blink the display for alerts without rewriting LCD text.
DHT22 data pins
- Sensor 1 data → analog pin A4
- Sensor 2 data → analog pin A5
- Both sensors also connect to 5 V and GND
Analog pins A4 and A5 work perfectly as digital inputs on the Uno. They appear as A4 and
A5 in code rather than D14/D15 aliases—worth remembering when
tracing wires by eye.
Reserved SPI pins (Ethernet)
The Ethernet shield reserves pins 10–13 for SPI. None of the LCD or DHT22 wiring may use those lines; they are effectively off-limits on the header. Planning around that reservation is what makes Ethernet plus local sensors feasible on one Uno.
// Example constructor matching this wiring
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, A2, 5, 6, 3, A3);
// DHT22 data lines (DHT library pin arguments)
#define DHT_PIN_1 A4
#define DHT_PIN_2 A5
#define BACKLIGHT_PIN 7 Return to the circuit wiring overview for breadboard layout context, or read DHT22 sensors and LCD display for runtime behavior.