← Back to Blog
IoTESP32BeginnersProjectsEmbedded Systems

IoT for Beginners: How It Works and 5 Projects to Build

18 November 20269 min readRobozz Lab Team
Smart bulbs, sensors and a smart camera arranged around a smartphone
In this article (10 sections)
  1. What is IoT?
  2. How an IoT system works
  3. Where is IoT used?
  4. What you need to start
  5. Which board should you choose?
  6. 5 beginner IoT projects
  7. Your first IoT program: control an LED from your phone
  8. Common mistakes to avoid
  9. A simple learning path
  10. Learn IoT hands-on at Robozz Lab

Your phone can switch off a light at home from another city. A farmer can see the soil moisture of a field without walking to it. A factory knows that a machine is getting hot before it breaks. All of this is IoT, the Internet of Things, and the basic idea is much simpler than the name suggests.

What is IoT?

IoT means connecting ordinary objects, such as a bulb, a pump, a door or a dustbin, to the internet so that they can send information and receive commands. The object gets a small computer (a microcontroller), some sensors to feel the world, and a network connection to talk to a phone or a server.

Every IoT device does four things: sense, send, decide and act.
An ESP32 board on a breadboard with a glowing LED
An ESP32 on a breadboard with an LED. Most IoT projects begin on a table like this.

How an IoT system works

Every IoT project, from a toy to a factory, follows the same five steps:

  1. 1SenseSensors measure something real: temperature, soil moisture, light, distance, gas or motion.
  2. 2ProcessA microcontroller such as the ESP32 reads the sensors and runs your program.
  3. 3ConnectThe data travels over Wi-Fi, Bluetooth or another network to a phone or a server.
  4. 4Store and showA cloud service or a web page keeps the data and shows it on a dashboard, with alerts if needed.
  5. 5ActA relay, motor, buzzer or display responds, either automatically or when you press a button on your phone.

Where is IoT used?

🏠
Smart homes
Lights, plugs, fans and cameras that you control from a phone or by voice.
🌱
Farming
Soil moisture and weather sensors that tell you when to water, so less water is wasted.
🏭
Industry
Sensors that watch machines and warn before they fail.
🏙️
Cities
Street lights, waste bins and parking spaces that report their own status.
⌚
Health and fitness
Watches and bands that track steps, heart rate and sleep.
🏫
Schools and labs
Student projects that teach electronics, coding and problem solving in one go.

What you need to start

  • ESP32 development board: the brain, with Wi-Fi and Bluetooth built in
  • A few sensors: DHT11 for temperature and humidity, a soil moisture sensor, an ultrasonic sensor and an LDR for light
  • A relay module and jumper wires, to switch things on and off
  • Breadboard and a good USB cable: some cables only charge and cannot send data, so keep one that works
  • Arduino IDE with the ESP32 board package installed
  • A Wi-Fi network (the original ESP32 works on 2.4 GHz) and a phone
Be careful
Keep beginner projects at low voltage (USB or battery). Never connect a relay to the 230 V mains supply unless the wiring is properly insulated and an experienced person is supervising.

Which board should you choose?

Arduino UnoESP32Raspberry Pi
TypeMicrocontrollerMicrocontrollerSmall computer
Wi-Fi / BluetoothNot built inBuilt inBuilt in on most models
Speed16 MHzUp to 240 MHz, two coresMore than 1 GHz
RunsYour program onlyYour program onlyLinux operating system
Best forLearning the basicsIoT, sensors and controlCameras, AI and heavy processing
Tip
For IoT, start with the ESP32. If you can blink an LED on an Arduino, you already know almost everything that you need, because the ESP32 uses the same Arduino IDE and the same style of code.
A temperature sensor and thermostat inside a greenhouse
A sensor watching the climate inside a greenhouse. The same idea works for a classroom, a room or a field.

5 beginner IoT projects

🌡️
1. Wi-Fi weather monitor
DHT11 and ESP32 show temperature and humidity on a web page that you open on your phone. Easy.
💧
2. Smart plant watering
A soil moisture sensor, a relay and a small pump water the plant only when the soil is dry. Medium.
💡
3. Phone-controlled light
A relay board switched from a web page hosted on the ESP32. Medium.
🔥
4. Gas and fire alert
An MQ-2 gas sensor and a flame sensor sound a buzzer and send an alert. Medium.
🗑️
5. Smart dustbin level
An ultrasonic sensor measures how full a bin is and shows it online. Easy.

Your first IoT program: control an LED from your phone

This program connects the ESP32 to your Wi-Fi and starts a tiny web server. Open the address that the Serial Monitor shows, followed by /on or /off, in your phone browser. Change the Wi-Fi name and password first.

#include <WiFi.h>
#include <WebServer.h>

const char* ssid = "YOUR_WIFI_NAME";
const char* password = "YOUR_WIFI_PASSWORD";
const int ledPin = 2;          // many ESP32 boards have an LED on pin 2

WebServer server(80);

void handleOn()  { digitalWrite(ledPin, HIGH); server.send(200, "text/plain", "LED ON"); }
void handleOff() { digitalWrite(ledPin, LOW);  server.send(200, "text/plain", "LED OFF"); }

void setup() {
  Serial.begin(115200);
  pinMode(ledPin, OUTPUT);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) delay(500);
  Serial.println(WiFi.localIP());   // open http://this-address/on in your browser
  server.on("/on", handleOn);
  server.on("/off", handleOff);
  server.begin();
}

void loop() {
  server.handleClient();
}

Common mistakes to avoid

  • 5 V sensors on ESP32 pins: the ESP32 pins work at 3.3 V, so check that a sensor is safe at 3.3 V or use a level shifter
  • A 5 GHz Wi-Fi network: the original ESP32 connects only to 2.4 GHz networks
  • A charge-only USB cable, which makes the board look dead because the computer never sees it
  • Forgetting a common ground between the ESP32, the sensor and the relay module
  • Sharing code with your Wi-Fi password still inside it

A simple learning path

  1. Step 1Learn basic electronics, circuits and how to use a multimeter
  2. Step 2Learn Arduino programming with LEDs, buttons and sensors
  3. Step 3Move to the ESP32 and connect it to Wi-Fi
  4. Step 4Build one of the five projects above and make it work reliably
  5. Step 5Add a phone app or a cloud dashboard, and then build your own idea

Learn IoT hands-on at Robozz Lab

At Robozz Lab in Indore, IoT and smart devices are a core part of what we teach and build: ESP32 projects with sensors, relays, Wi-Fi and phone control, from smart irrigation to home automation. You build each project yourself with a trainer beside you, so you understand every wire and every line of code. If you are a student looking for a school or final-year project, we can guide you from the idea to the viva.

Keep reading

Have a question? Message us on WhatsApp.

Talk to the Robozz Lab team directly about projects, school labs, training or internships.

WhatsApp UsMore Articles

More from the blog

A laptop screen showing a live data dashboard
ESP32 Sensor Data to a Website with Cloud MQTT and Netlify
16 min read
A laptop showing code in a dark room with blue light
Embedded Systems, Arduino, and ESP32 — What Should You Learn First?
8 min read
Blue network cables plugged into a network switch
Communication Protocols Explained: UART, I2C, SPI, CAN, MQTT
14 min read
WhatsApp Us