cover photo

BLOG · 30/3/2026

Marvel level 0 task continued

Marvel level 0 task continued
This Article is yet to be approved by a Coordinator.

Task 6: The Matrix Puzzle — Decoding with NumPy

Objective

The goal of this task was to decode a scrambled numerical matrix and reveal a hidden image using NumPy for matrix manipulation and Matplotlib for visualization.

I used Google Colab so I didn’t need to install any libraries locally.


Tools Used

  • Python
  • NumPy (array manipulation)
  • Matplotlib (data visualization)
  • Google Colab (cloud notebook environment)

1: Upload the Encoded File

The encoded matrix was provided in .npy format.

Steps followed:

  • I opened Google Colab.
  • I created a new notebook.
  • I uploaded the file using the Files panel on the left sidebar.

To confirm that the file was uploaded correctly, I ran:

import os
os.listdir()

This displayed all files in the current working directory and confirmed that the .npy file was available.


2: Import Required Libraries

Next, I imported the libraries required for the task.

import numpy as np
import matplotlib.pyplot as plt
  • NumPy is used for numerical operations and matrix manipulation.
  • Matplotlib is used to visualize the matrix as an image.

3: Load the Encoded Array

I loaded the encoded .npy file using NumPy.

data = np.load("encoded_array.npy")

Then I inspected the structure of the array.

print(data.shape)
print(data.size)

This helped me understand the total number of elements stored in the encoded array.


4: Reshape the Array into a Square Matrix

The encoded data was stored as a 1D array, but images require a 2D matrix.

To fix this, I calculated the square root of the total number of elements and reshaped the array.

size = int(np.sqrt(data.size))
matrix = data.reshape(size, size)

This converted the flat array into a square matrix representing image pixels.


5: Visualize the Matrix as an Image

After reshaping the array, I visualized it using Matplotlib.

plt.imshow(matrix, cmap="gray")
plt.axis("off")
plt.show()

At first the image appeared scrambled or incorrectly oriented, which meant further transformations were needed.


6: Decode the Image

Based on the clues provided in the task, I experimented with different NumPy transformations such as:

  • Transposing the matrix
  • Flipping the matrix vertically
  • Flipping the matrix horizontally

Example transformation:

matrix = matrix.T
matrix = np.flipud(matrix)

After applying the correct combination of transformations, the hidden image became visible.


Outcome

Through this task I learned:

  • How to load .npy files using NumPy
  • How to reshape arrays into matrices
  • Basic NumPy operations like transpose and flipping
  • How to visualize 2D arrays using Matplotlib

Overall, this task provided a simple introduction to working with NumPy arrays and data visualization in Python.

https://github.com/user-attachments/assets/caafce82-ee8f-40d0-a06f-495a1de09feb

Task 7 — Portfolio Webpage

https://lochanelectron.github.io/discoveryprofile/

What the Task Was

Build a personal portfolio website that shows info about yourself — interests, projects, social media, etc. It had to be responsive and pushed to a GitHub repo. No framework restrictions.


What I Built

A single-page portfolio using plain HTML, CSS, and vanilla JavaScript — no frameworks needed.

The site has these sections:

  • Hero — Name, tagline, and a call-to-action button
  • About — A short intro with a live "status" card showing current state (mood, passion found, etc.)
  • Education — A timeline layout with placeholder slots to fill in degree and school details
  • Interests — Cards covering things like building stuff and iterating through life experiences
  • Projects — Pre-styled cards ready to be filled in with real projects later
  • Contact — Email listed, all social media platforms crossed out (not on any of them)

Design Choices

  • Dark theme with yellow accents
  • Syne (display font) + Space Mono (body font) — gives it a techy but personality-filled look
  • Scroll animations using IntersectionObserver
  • Fully responsive — hamburger menu on mobile, single-column layout on small screens
  • Humor baked in — status shows passion_found: false, contact section says "this man is living under a rock"

How to Deploy (GitHub Pages)

  1. Create a GitHub account at github.com
  2. Make a new public repo named your-username.github.io
  3. Upload index.html via the GitHub UI
  4. Go to Settings → Pages, set branch to main, save
  5. Live URL will be: https://your-username.github.io

What's Left to Fill In

SectionWhat to add
EducationDegree name, university, years
ProjectsProject name, description, link
ContactNothing — email is already there

Files

FileDescription
index.htmlThe entire website — HTML + CSS + JS in one file

Task 8

How to Build a Laser Artillery for Mosquito Annihilation

Mosquitoes are tiny flying vampires that exist purely to ruin human happiness. In this article, we will design a completely unnecessary but highly satisfying laser defense system to eliminate them.

"If you know the enemy and know yourself, you need not fear the result of a hundred battles." – Sun Tzu


Required Components

  • 1 Overpowered laser module
  • 1 mosquito detection radar
  • 1 computer with Python installed
  • A strong sense of revenge
mosquitoes = ["buzz1", "buzz2", "buzz3"]

for target in mosquitoes:
    print("Target locked:", target)
    print("Firing laser...")

Tinkercad Radar System using Ultrasonic Sensor and Servo Motor

https://www.tinkercad.com/things/8SoRz5937OM-task-9-radar-technology?sharecode=QM6hJPJ7FRh1C6tnbEFUOc9_LlNKiD1OQsxqv2dsR9k

Aim

To create and simulate a simple radar system using Tinkercad with an ultrasonic sensor and servo motor to detect objects and display their distance on the serial monitor.


Introduction

Tinkercad

:contentReference[oaicite:0]{index=0} is an online platform used for designing 3D models and simulating electronic circuits. It allows users to build circuits using virtual components like Arduino boards, sensors, and motors without physical hardware.

Ultrasonic Sensor

The ultrasonic sensor (HC-SR04) measures distance using sound waves.

  • It sends ultrasonic waves through the Trig pin.
  • The waves hit an obstacle and reflect back.
  • The Echo pin receives the reflected signal.
  • The time taken for the signal to return is used to calculate the distance.

Servo Motor

A servo motor is a motor that can rotate to a specific angle (0°–180°).
In this project, the servo motor rotates the ultrasonic sensor to scan the surroundings.

Radar Technology

Radar systems detect objects using radio or sound waves. In this project, the ultrasonic sensor acts like a small radar by sending waves and detecting objects based on the reflected signal while the servo motor scans a wider area.


Components Used

  • Arduino Uno
  • Ultrasonic Sensor (HC-SR04)
  • Servo Motor
  • Connecting wires
  • Computer with Tinkercad simulation

Circuit Connections

  • Trig pin → Arduino Pin 10
  • Echo pin → Arduino Pin 11
  • Servo signal pin → Arduino Pin 9
  • VCC → 5V
  • GND → GND

Working

  1. The servo motor rotates from 0° to 180° and back.
  2. At each angle, the ultrasonic sensor sends an ultrasonic pulse.
  3. The pulse reflects back when it hits an object.
  4. The Arduino measures the time taken for the echo to return.
  5. The distance is calculated using the formula:

Distance = (Time × Speed of Sound) / 2

  1. The angle and distance values are displayed on the Serial Monitor.

DC Motor Speed Control using ESP32 and Potentiometer

https://www.tinkercad.com/things/k67gyamAKQP-task-10-speed-control-of-motor?sharecode=ZtX9hunWDmw_VMBZZNvtPVp4DR3AHdN8--InCXOjzwI

Aim

The aim of this project is to control the speed of a DC motor using a potentiometer and an ESP32 microcontroller.

Components Used

  • ESP32 Dev Module
  • L298N Motor Driver
  • 5V DC Motor
  • Potentiometer
  • External Power Supply
  • Jumper Wires

Principle

In this project, I control the motor speed using PWM (Pulse Width Modulation).
The ESP32 reads the analog value from the potentiometer. Based on this value, it changes the PWM signal sent to the L298N motor driver. This changes the voltage supplied to the motor, which controls its speed.

Connections

Potentiometer to ESP32

  • One pin → 3.3V
  • One pin → GND
  • Middle pin → GPIO 34

L298N to ESP32

  • IN1 → GPIO 26
  • IN2 → GPIO 27
  • ENA → GPIO 25
  • GND → ESP32 GND

Motor Connections

  • Motor terminals → OUT1 and OUT2 of L298N
  • External power supply → L298N motor power input

Working

When the system is powered on, the motor starts running.
The ESP32 continuously reads the potentiometer value. When I rotate the potentiometer, the analog value changes. The ESP32 converts this value into a PWM signal and sends it to the motor driver. Because of this, the motor speed increases or decreases depending on the position of the potentiometer.

Result

I successfully controlled the speed of a DC motor using a potentiometer and ESP32.

https://github.com/user-attachments/assets/115242c0-449a-4f7f-b17e-a12fbb55cbae

Led Toggle using Esp32

Goal of the project

The goal is to build an ESP32 web server that lets you control two LEDs through a web interface. When you access the ESP32’s IP address in a browser, you’ll see buttons to turn the LEDs ON/OFF. This project demonstrates basic IoT principles, including network communication, GPIO control, and dynamic web content generation.

Components Used

  • ESP32 Development Board
  • 2x LEDs (we used light of servo driver module as 2nd LED since we could not find another LED in time)
  • 2x 1K Ohm Resistors
  • Breadboard and Jumper Wires
  • Micro-USB Cable

Concept

  • Wifi library allows esp32 to establish connection with desired network
  • Using Wifi, a web server will be hosted, with a predefined port number of 80 which is standard for http communication
  • In the code a variable ‘header’ is initialized to store incoming HTTP requests and another segment of the code is integral to handling incoming client connections. It listens for clients and processes incoming data

Process

  • Understand the concept
  • Make the necessary connections using recommended components GPIO 26: Connect the first LED GPIO 27: Connect the second LED GND: Common ground for LEDs
  • connect the esp32 to a computer using a cable, open arduino IDE and upload the code that was given
  • In serial monitor, a web link will be available, paste it onto browser and GO

---done---

https://github.com/user-attachments/assets/fbae05b8-aedd-4389-a5d5-2c41242f7534

Soldering Prerequisites

What is soldering

Soldering is the process of joining two or more electronic parts together by melting solder around the connection.

Equipments Involved

  • Soldering Iron : A soldering iron is a hand tool that plugs into a standard 120v AC outlet and heats up in order to melt solder around electrical connections
  • Soldering station : Tool used to precisely adjust the temperature of the soldering iron which is great for a range of projects
  • Sponge/Brass : To clean the tip of soldering iron
  • Solder : Solder is a metal alloy material that is melted to create a permanent bond between electrical parts. Solder is usually made up of a Tin/Copper alloy. You can also use leaded 60/40 (60% tin, 40% lead) rosin core solder but it’s becoming less popular due to health concerns.
  • Flux : Solder flux is a substance that helps clean and forms a strong bond between parts of the electronics or wires. It achieves this by removing impurities from the surface and preventing them from interfering with the bond between it and the solder.

Types of solder tips

  • conical tip
  • chisel tip

Types of Flux

  • Rosin Flux
  • Water-soluble flux
  • No-clean flux

Experiment: 555 Astable Multivibrator (Duty Cycle ≈ 60%)

Aim

To design and build a 555 astable multivibrator with a duty cycle of about 60% and observe the output waveform using a Digital Storage Oscilloscope (DSO).

Components Used

  • IC 555 timer
  • Resistors (R1, R2)
  • Capacitor (C)
  • Breadboard
  • Connecting wires
  • Power supply
  • DSO (Digital Storage Oscilloscope)

Theory

A 555 timer in astable mode produces a continuous square wave.
The duty cycle is given by:

D = (R1 + R2) / (R1 + 2R2)

By selecting suitable values of R1 and R2, I can get a duty cycle close to 60%.
If R1 = R2, the duty cycle becomes about 66% (which is not needed) so me went with described ratio of 1:2.

Procedure

  1. I calculated suitable values of R1 and R2 for ~60% duty cycle.
  2. I connected the 555 timer circuit on the breadboard.
  3. I provided power supply to the circuit.
  4. I connected the output pin to the DSO using probes.
  5. I observed and measured the waveform on the DSO.

Observation

  • A square wave output was observed on the DSO.
  • The ON time was slightly more than the OFF time.
  • The measured duty cycle was approximately 60% (if precise, then it was around 59.4 ig).

Result

I successfully designed and implemented a 555 astable multivibrator with a duty cycle close to 60% and verified the output using a DSO. (I did face a problem of getting result duty cycle of 47%, which was diagnosed by my friend and mistake was using 1000microF capacitor which was more than required amount).

Conclusion

The experiment was successful. I learned how to design an astable multivibrator and verify its output waveform practically.

https://github.com/user-attachments/assets/1e5c80d6-f2c0-4ba3-84af-d9b5671404fe

UVCE,
K. R Circle,
Bengaluru 01