MARVEL LEVEL 1 TASKS
5 / 6 / 2025
Task 1: Simon Says Game with ESP32
This was a fun one! I made the classic “Simon Says” memory game using an ESP32, four LEDs, and four pushbuttons. Each LED represented a color, and a random sequence would light up. I had to remember the sequence and press the right buttons in order. If I got it right, the game added one more color to the sequence and went to the next round. If I made a mistake, it played a “game over” tone and started over. I learned how to handle pushbutton inputs, manage random sequences, and add sound feedback. It was my first real-time game with ESP32, and it made me comfortable with GPIO and logic handling.
Components Used:
ESP32 – The main controller handling logic and timing.
4 LEDs – Represented the color sequence.
4 Push Buttons– User inputs to match the sequence.
Buzzer – For level-up and game-over sounds.
Resistors – Pulldown for buttons and current limiting for LEDs.
Task 2: Basics of MQTT Protocol and Other Communication Protocols
In this task, I explored the MQTT (Message Queuing Telemetry Transport) protocol and other essential communication and network protocols that facilitate data exchange across the internet.
I always heard about MQTT in IoT, so I finally explored it. It works using a publish-subscribe model. I understood the role of brokers, clients, and topics — where the publisher sends data, and the subscribers receive it. I also explored different protocols like Bluetooth, Wi-Fi, LoRa, CoAP, Zigbee, and more. I created a small document comparing their layers, strengths, and use cases. It helped me see which protocol suits what kind of IoT project for example, LoRa for agriculture and Wi-Fi for home automation.
REPORT ON MQTT Protocol and Other Communication Protocols
Task 3: Basics of Creating a Website
This was my intro to web development! I built a super simple web page using HTML, CSS, and JavaScript. It had a button that changed the background color of the page in VIBGYOR order. I was amazed to see how front-end styling and JavaScript logic come together. It may be basic, but it helped me understand DOM manipulation and the basics of how a website looks and works.
Technologies Used
- Frontend: HTML, CSS, JavaScript
- Hosting: Runs on
localhost:3000
Links
Task 4: ESP32-CAM Surveillance Robot
For this, I built a small robot that could stream live video using an ESP32-CAM and move using an L298N motor driver controlled by another ESP32. Since the ESP32-CAM was busy streaming video, I couldn’t use it to control the motors, so I used for camera.The ESP32-CAM is a popular development board based on the ESP32 chip, which integrates both Wi-Fi and Bluetooth connectivity along with a camera module.
ESP32 CAM has no onboard data connection port so we had to use FTDI programmer to upload code.
Components Used:
ESP32-CAM – For video capture and streaming.
ESP32 – To control motor movement (separately).
L298N Motor Driver – To run the DC motors safely.
DC Motors – For movement.
Battery Pack – To power the robot.
Task 5 : MQTT Publish and Subscribe Using Cloud MQTT
The objective of this task was to establish a functional MQTT-based communication system to control three individual LEDs using a cloud MQTT broker. The system should respond to published messages and toggle each LED independently based on the message content.In this task, I used HiveMQ, a public MQTT broker. I wrote a Python script as the publisher and programmed an ESP32 as the subscriber. The Python script sent messages like “LED 1 ON,” “LED 2 OFF,” etc., and based on the topic, the ESP32 would turn ON/OFF the respective LEDs. It was like remote controlling LEDs using messages — no wires, just internet! This task really deepened my understanding of how cloud communication works in IoT.
Tools and Platforms Used
- Microcontroller: ESP32
- MQTT Broker: broker.hivemq.com (public broker)
- MQTT Client: MQTT Lens / HiveMQ Web Client
- Programming Environment: Arduino IDE
- Protocol: MQTT (Message Queuing Telemetry Transport)
Methodology
- The ESP32 was connected to Wi-Fi and configured to subscribe to the topic
led/control
. - Three LEDs were connected to designated GPIO pins on the ESP32.
- Messages published to the MQTT topic (
LED1 ON
,LED2 OFF
, etc.) were received by the subscriber. - The ESP32 processed these messages and toggled the respective LED accordingly.
- The system was tested using MQTT Lens and HiveMQ Web Client for real-time message publishing.
Test Cases and Results
MQTT Message | Expected Action | Result |
---|---|---|
LED1 ON | Turns ON LED 1 | Successful |
LED2 OFF | Turns OFF LED 2 | Successful |
LED3 ON | Turns ON LED 3 | Successful |
LED3 OFF | Turns OFF LED 3 | Successful |
LINK TO MQTT PUBLISHER PYTHON CODE
Task 6: Sending DHT11 Sensor Data to ThingSpeak
Here, I connected a DHT11 sensor to ESP32 and started sending temperature and humidity data to ThingSpeak using its API. I could see live graphs getting updated every few seconds! I also downloaded the data and plotted my own graph using matplotlib in Python. This task helped me connect the physical world to the cloud and do some basic data visualization.
Components Used:
ESP32 – To read sensor data and send to internet.
DHT11 Sensor – Measures temperature and humidity.
ThingSpeak API– Used for data visualization.
Key Steps
- Interfaced the temperature sensor with ESP32.
- Sent temperature readings to ThingSpeak using the Write API Key.
- Plotted real-time graphs using ThingSpeak’s built-in visualization tools.
LINK TO ESP32 Code to Send Data to ThingSpeak
Task 7: Communication Using I2C Protocol
The objective of this task was to understand and implement the I2C (Inter-Integrated Circuit) communication protocol, which uses two wires: the Serial Data Line (SDA) and the Serial Clock Line (SCL). This protocol enables communication between multiple devices on the same bus, with multiple controllers capable of sending and receiving data.This was all about I2C protocol — two wires (SDA, SCL) connecting ESP32 (as Master) and Arduino UNO (as Slave). I hosted a web server on ESP32 where I typed a message. That message was sent to the Arduino via I2C and displayed on the serial monitor. It was exciting to see how two microcontrollers can talk to each other just like humans texting
Key Components:
- I2C Protocol: A serial communication protocol utilizing SDA and SCL lines.
- ESP32: Used as the Slave device for sending messages.
- Arduino (or equivalent): Used as the Master device to send data to the ESP32.
- Serial Monitor: Used to display the messages sent and received by the ESP32.
Implementation:
- I2C Setup: Configured the I2C protocol between the Master (Arduino) and Slave (ESP32).
- Code Upload: Uploaded the code to the devices, ensuring the correct COM port was selected for proper communication.
- Message Transmission: The Master device sent messages, which were then received by the Slave (ESP32). The message was displayed in the Slave’s serial monitor.
- Data Monitoring: Used the Serial Monitor to view the messages sent from the Master and received by the Slave via I2C.
The task was successfully completed, with messages being sent and received between the Master and Slave using the I2C protocol. The messages were displayed on the ESP32’s serial monitor, demonstrating effective communication between the two devices.
Task 8: Flashing Morse Code
The goal of this project was to use an ESP32 microcontroller to receive messages through a web server and translate them into Morse code signals, which would then control an LED. This project helped me improve my skills in ESP32 programming, web server hosting, and Morse code encoding.The ESP32 converted it into Morse Code and blinked it through an LED. Dots (short blinks), dashes (long blinks). I had to map each character to its Morse code and create a timing-based blinking pattern.
How It Works
- A message is sent through the web server.
- The ESP32 converts the message into Morse code.
- The LED blinks according to the Morse code pattern (short and long blinks representing dots and dashes).
This was a great practical exercise that reinforced my understanding of embedded systems and real-time applications!
Task 9: Soil Moisture Sensor
I connected a capacitive soil moisture sensor to my ESP32 and read the analog values from soil. I found that when the soil was dry, the reading was high, and when watered, the value dropped. I printed the result on the serial monitor and added an alert message if it went below a certain level. It was a good intro to smart irrigation systems.
Components Used:
ESP32 – Reads analog values.
Capacitive Soil Moisture Sensor – Senses soil condition.
Serial Monitor – To show moisture level.
Task 10 : Read and Display Vitals Using MAX30100 Sensor and ESP32
The objective of this task was to measure heart rate and blood oxygen levels using the MAX30100 sensor, then display the readings on an Android application created with MIT App Inventor. The app was designed to send notifications when the readings were outside the normal range. Communication between the ESP32 and the Android app was intended to be established using either a web server or MQTT protocol.
Key Components:
- MAX30100 Sensor (for measuring heart rate and blood oxygen levels)
- ESP32 Microcontroller
- MIT App Inventor (for Android app development)
- Communication Protocol: Web server or MQTT
Implementation:
- Sensor Integration: The MAX30100 sensor was connected to the ESP32 to collect heart rate and oxygen data.
- Data Transmission: Data was to be transmitted to the Android app using either a web server or MQTT protocol.
The task faced a significant challenge where the MAX30100 sensor was unable to collect data. Despite attempts to interface the sensor with the ESP32, no valid readings were obtained. As a result, the planned communication between the ESP32 and the Android app could not be completed, preventing full implementation of the task.
Task 11: Fire Alarm System with Email Alerts
This one was thrilling (and had to be tested safely!). I used a flame sensor that detects infrared radiation from fire. When it detected fire (we used a lighter carefully, outside the lab), the ESP32 immediately triggered a Wi-Fi-based email alert. I followed the RandomNerdTutorials guide to set up Gmail SMTP. It was cool to see a real-time notification system working just like smart fire detectors in buildings.
How It Works
- The infrared flame sensor detects the infrared radiation emitted by flames. It contains a photodiode that responds to specific wavelengths of light produced during combustion.
- When a flame is detected, the sensor generates a digital output signal indicating the presence of fire.
- The ESP32 microcontroller continuously monitors this signal.
- Upon detecting a high signal from the flame sensor, the ESP32 triggers the LED to light up as an alert.
- The system can be further enhanced to send email notifications when a fire is detected, allowing for remote alerts.
THANK YOUUU!!!!!!