Skip to content
ThinkNMake — Don't just think. Make it.
IntermediateAges 13–18 3 h

Smart Home Controller

Switch a lamp and read room temperature from your phone with an ESP32.

Project kit

$19.61

6 parts in one box

Unlocks the code, wiring and step-by-step guide.

Or get the kit

$92

IoT Kit (ESP32) · 1 projects

Objective

Build a Wi-Fi controller that shows temperature and humidity on an OLED and toggles a relay from a web page.

How it works

The ESP32 joins your Wi-Fi and serves a small web page. Pressing the button on the page sends a request that flips the relay. The DHT22 is polled every 2 s and the readings are shown on the OLED and the page.

Components you'll need

ComponentQtyAvailabilityPrice
ESP32 DevKit V1×1In stock$8.12
DHT22 Temperature & Humidity Sensor×1In stock$2.73
1-Channel Relay Module×1In stock$0.79
0.96" OLED Display (I2C)×1In stock$3.99
Jumper Wire Set (120 pcs)×1In stock$2.99
Breadboard medium×1In stock$0.99
Bought one by one$19.61

All of these come in IoT Kit (ESP32).

Circuit & connections

The full wiring diagram and pin-by-pin connections.

Already bought it? Log in

Code

The complete, tested sketch (18 lines), ready to upload.

Already bought it? Log in

Step-by-step instructions

4 illustrated steps:

  1. 1Set up the IDE
  2. 2Breadboard the circuit
  3. 3Flash and find the IP
  4. 4Control it
Already bought it? Log in

Troubleshooting

Fixes for the problems makers hit most often on this build.

Already bought it? Log in