cover photo

COURSEWORK

Amisha's IOT-001 course work. Lv 2

Amisha BagiAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

16 / 6 / 2025


TASK 1- SIMON SAYS

This task involves building a memory-based game where the ESP32 flashes LEDs in a random sequence. Each LED is linked to a pushbutton, and the player must replicate the sequence by pressing the correct buttons. With each successful round, the sequence gets longer and more challenging. The game then restarts automatically, helping users get familiar with ESP32, GPIO handling, and input/output interaction.

1.The ESP32 randomly blinks a sequence of LEDs.

2.The player must reproduce the sequence by pressing the correct buttons.

3.With every correct input, the sequence length increases, making the game progressively more difficult.

4.If the player makes a mistake, "Game Over" is displayed on the Serial Monitor, and the game automatically restarts.

simon simonsays2

Code

TASK 2- BASICS OF MQTT PROTOCOL AND OTHER COMMUNICATION PROTOCOL

MQTT stands for Message Queuing Telemetry Transport. It is a lightweight, publish -subscribe network protocol. It is designed for low-bandwidth, high latency perfect for IoT. WORKING: Publishers send message to a broker on a topic. Subscribers subscribe to that topic. Broker forwards the relevant message to all the subscribes.

Different types of Communication Protocols:

1.HTTP: Traditional lab Protocol used for simple communication and applicable in IoT dashboards.

2.CoAP(Constrained Application Protocol): Web transfer protocol for low power devices and used in Smart lighting control.

3.AMQP(Advanced Message Queuing Protocol): It is a reliable messaging protocol and used in IIot applications.

4.LoRaWAN: Long-range ,low-power protocol used in Remote weather stations.

Different Networking Protocols in IoT

Wi-Fi, Bluetooth, ZigBee, Z-Wave, Cellular(4G/5G),Ethernet.

Final Takeaways:

In IoT, different protocols are used based on: Power Consumption, Range, Speed, Reliability.

TASK 3- BASICS OF CREATING A WEBSITE

In this task, I explored the basics of web development by creating a simple interactive website with both front-end and back-end components. The webpage was built using HTML and communicates with a backend Node.js server running on HTTPS port 5000. The core feature is a toggle button that changes the background color of the page when clicked, demonstrating how the front end can interact with user actions and potentially communicate with a backend server. toggle Code

TASK 4- MQTT PUBLISH AND SUBSCRIBE USING CLOUD

In this task, I established seamless two-way communication between a Python script and an ESP32 microcontroller using the MQTT protocol over the internet. The project demonstrates remote LED control via MQTT messages, making it a practical introduction to IoT communication protocols. I used MQTT broker Hive MQ to enable this interaction, publishing messages such as:

"LED 1 ON"

"LED 2 OFF"

"LED 3 ON"

The ESP32 subscribes to these topics and responds accordingly by turning ON or OFF the corresponding LEDs.

temperature

Code

TASK 5- SENDING A DATA TO THINGSPEAK

In this task,ESP32 microcontroller is used to send temperature data from a DHT11 sensor to the ThingSpeakcloud platform. The data was posted using HTTP get requests through the ThingSpeak API. The Project involved the following steps:

  1. sensor Integration
  2. wifi connectivity
  3. data posting
  4. graph visualization

thingspeak1 thingspeak2

ESP32 Code

Python Code

TASK 6- COMMUNICATION USING I2C PROTOCOL

I2C (Inter-Integrated Circuit) is a wired communication protocol that allows multiple devices(sensors, microcontrollers) to communicate with each other using only two wires: SCL(Serial Clock Line) carries the clock signal and SDA(Serial Data Line) carries the data. One device acts as Master(controls the clock and communication), others acts as slaves(responds to master). Each device has unique address so the master knows which one it is talking to. Here, ESP32 will be Master and Arduino will be slave. Hosted a web server on ESP32 where user can type a message. ESP32 sends that message via I2C to Arduino. Arduino receives the message and displays it on an LCD screen.

protocol

Arduino Code

ESP32 Code

TASK 7- FLASHING MORSE CODE

This is applicable as a webserver for communication. ESP32 microcontroller is set up to host webserver that prompts user to enter a message through a simple HTML interface. The components required are ESP32, LEDs, breadboard and jumper wires. ESP32 captures the test, converts it into Morse code using predefined timing rules, and flashes the LED accordingly to represent each letter and number in dots(short blinks) and dashes(long blinks). morsecode

webmorse

Code

TASK 8- SOIL MOISTURE SENSOR

In this task, I learned how to measure the moisture content of soil using a capacitive soil moisture sensor, interfaced with an ESP32 microcontroller. The moisture level is read as an analog value and displayed on the Serial Monitor.

The key principle is based on the change in capacitance caused by varying water content in the soil. Water has a higher dielectric constant compared to air or dry soil. Therefore, as the water content in soil increases, the sensor's capacitance increases, affecting the analog signal output.

soilmoisture

Code

TASK 9- READ AND DISPALY VITALS

In this task, I developed a remote health monitoring system that measures heart rate and blood oxygen saturation (SpO2) using the MAX30100 sensor. The sensor communicates with an ESP32 microcontroller, which acts as a web server and shares the vitals with a custom-built Android application developed using MIT App Inventor.

The system can alert users when the vital signs are outside the healthy range, enabling real-time health monitoring—particularly useful for patients, athletes, or the elderly.

vitals

Code

TASK 10- FIRE ALARM SYSTEM

In this task, I developed a fire alarm and alert system using an ESP32, an infrared flame sensor, and an LED indicator. The system is designed to detect flames through infrared radiation and send an email alert to designated recipients when a fire is detected—enabling early warnings and faster emergency response.

firealram

Code

UVCE,
K. R Circle,
Bengaluru 01