A mirror display that wakes up with a greeting when you stand in front of it.
Built and tested by Shahan Fathima K · Industrial Robotics Institute

An interactive mirror display. A PIR sensor notices when someone steps in front of the mirror and the ESP8266 turns on a 16×2 LCD showing a greeting and message. When nobody is there, the backlight switches off to save power.
| Component | Qty |
|---|---|
| ESP8266 NodeMCU | 1 |
| PIR Motion Sensor | 1 |
| 16×2 LCD with I2C Module | 1 |
| Jumper Wires | As needed |
| Power Supply | 1 |
| From | Connect to |
|---|---|
| PIR VCC | 5V (VIN) |
| PIR GND | GND |
| PIR OUT | D1 |
| LCD VCC | 5V (VIN) |
| LCD GND | GND |
| LCD SDA | D2 |
| LCD SCL | D3 |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP8266 NodeMCU.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define pirPin D1
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
pinMode(pirPin, INPUT);
Wire.begin(D2, D3); // SDA = D2, SCL = D3
lcd.init();
lcd.backlight();
lcd.print("Smart Mirror");
delay(2000);
lcd.clear();
}
void loop()
{
int motion = digitalRead(pirPin);
if (motion == HIGH)
{
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Hello User");
lcd.setCursor(0, 1);
lcd.print("Stay Focused");
}
else
{
lcd.noBacklight();
}
delay(500);
}An interactive mirror display. A PIR sensor notices when someone steps in front of the mirror and the ESP8266 turns on a 16×2 LCD showing a greeting and message.
You need: ESP8266 NodeMCU (1), PIR Motion Sensor (1), 16×2 LCD with I2C Module (1), Jumper Wires, Power Supply (1). Software: Arduino IDE, LiquidCrystal_I2C library.
Yes. It is rated beginner and takes about 1–2 hours to build, using the ESP8266 NodeMCU. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-062). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.