cover photo

BLOG · 26/4/2026

rest of level !

rest of level !
This Article is yet to be approved by a Coordinator.

3b- Controlling LEDs Using MQTT

Objective: Utilize any MQTT platform to establish publishing and subscribing functionalities.

This experiment explores the basics of the MQTT protocol and its working model in IoT communication systems. MQTT is a lightweight publish–subscribe messaging protocol where devices communicate through a central broker instead of sending messages directly to each other. A publisher device sends a control message (such as an LED ON/OFF command) to a specific topic on the broker, and all subscriber devices that are subscribed to that topic receive the message instantly. In this setup, when a message is published to control LEDs, the subscriber device reads the received payload and activates the corresponding LED accordingly. Through this activity, learners understand how MQTT enables efficient, low-bandwidth, real-time device communication and how it compares with other network and communication protocols used in IoT systems.

Source code

Task 4 – Communication using I2C Protocol

Objective: Both ESP32 boards should host web servers for bidirectional communication.

The I2C (Inter-Integrated Circuit) protocol is a widely used serial communication method that enables multiple devices to communicate using only two lines: SDA (Serial Data) and SCL (Serial Clock). It operates on a master-slave architecture, I2C is particularly useful for short-distance communication between microcontrollers and other devices such as displays and sensors. In this project, the ESP32 was configured as the master and hosted a web server through which a user could input a custom message. This message was then transmitted via the I2C bus to the Arduino UNO, which functioned as the slave. The message received by the other esp32 was shown in the LCD screen. I couldn,t complete it.

Task 5- Sending Data to ThingSpeak and Creating a Regression Model

Objective:

Publish temperature data from ESP32 to ThingSpeak. Retrieve the dataset from ThingSpeak for analysis. Using Matplotlib in Python, plot the graph of Temperature vs. Time. Create a regression model to analyze the relationship between Humidity (from a DHT11 sensor) and Moisture Percentage (from a capacitive soil moisture sensor).

This experiment demonstrates how to send real-time environmental data from an ESP32 to the ThingSpeak cloud platform and analyze it using Python-based data visualization and regression modeling. The ESP32 reads temperature and humidity values from a DHT11 sensor and moisture percentage from a capacitive soil moisture sensor, then publishes the data to ThingSpeak using its API. The uploaded dataset is retrieved from the server for offline analysis. Using Matplotlib in Python, graphs such as Temperature vs. Time, Temperature vs. Soil Moisture, and Humidity vs. Soil Moisture are plotted to observe trends and relationships. A regression model is then created to study and predict the relationship between humidity (independent variable) and moisture percentage (dependent variable), with a regression graph plotted using Humidity on the X-axis and Moisture Percentage on the Y-axis. Through this activity, learners gain practical experience in cloud data publishing, data retrieval, visualization, and applying basic machine learning techniques for environmental prediction.

alt text alt text at text

ML code Source code

alt text

Web Servers & Local Interfaces

Task 6 – Flashing Morse Code

Objective: Create a website that converts typed input (normal words) to Morse code. The LED should blink according to the Morse code generated.

In this task, I set up an ESP32 to host a web server where users can enter a message through a simple HTML interface.I didn't make a seperate website I created an webserver in the esp32 cpp code which gave me an ip address which when put browser gives the morse code interface websiite. The ESP32, connected to an LED, captures the message, converts it into Morse code, and then flashes the LED accordingly.

Each letter and number is represented by dots (short blinks) and dashes (lno blinks). This task demonstrated a real-life application of a web server for communication, allowing messages to be sent and displayed in Morse code through the LED.

Source code

Task 7 - Health Vitals Dashboard

Objective: Plot graphs of the vitals on a webserver for real-time monitoring.

In this task, I set up an ESP32 to host a web server where users on a graph like server. In this one we use the chart.js framework to get it. The problem I faced was that the sensor doesn't givee proper output.

This implements a real-time heart rate using a microcontroller connected to a bbp sensor. The measured physiological signals are processed and transmitted to a built-in webserver, where they are displayed graphically in a browser dashboard. The system enables remote, contact-based health monitoring using IoT principles.

Sorce code

Actuation, Surveillance & Alerts

Task 8 - Wi-Fi Controlled Surveillance Bot with Live Video Stream

Objective: Create a surveillance bot capable of capturing live video feed and remotely controlling its movements.

For this task, I had built a surveillance robot using the ESP32-CAM for video streaming and the ESP32 for controlling movement. I made the chasis I haven't completed ot yet.

Task 9- Fire Alarm System with SMS Alerts

Objective: Learn about fire detection and integrating SMS alert systems using APIs.

For this task, I used an temperature sensor and an ESP32. The flame sensor detects temperture emitted by fire using a thermotransistor that responds to the temperature produced during combustion. When a flame is present, the sensor sends a digital high signal to the ESP32.

The ESP32, always connected to Wi-Fi, continuously monitors the sensor. When fire is detected, it immediately sends an email alert to notify selected recipients about the potential fire hazard.

UVCE,
K. R Circle,
Bengaluru 01