Skip to content

Commit f415628

Browse files
authored
Enhance README with badges and content updates
Updated README with badges, improved clarity, and added details about data files.
1 parent a25f758 commit f415628

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,43 @@
11
# MicroDiff: Embedded Text Analysis Engine 🚀
22

3-
## Overview
3+
![C++](https://img.shields.io/badge/Language-C++-blue.svg)
4+
![Platform](https://img.shields.io/badge/Platform-Arduino-00979D.svg)
5+
![Status](https://img.shields.io/badge/Status-Completed-success.svg)
6+
7+
## 📖 Overview
48
MicroDiff is a lightweight, hardware-integrated text analysis engine designed specifically for memory-constrained embedded systems. It performs real-time comparison of text strings (such as system configuration plans) using a highly optimized Longest Common Subsequence (LCS) algorithm.
59

6-
Bridging the gap between theoretical computer science and bare-metal mechatronics, this system processes data with extreme memory efficiency and makes physical actuation decisions based on textual similarity percentages. This project was developed to demonstrate advanced algorithmic principles in applied engineering contexts as part of academic coursework at Amirkabir University of Technology.
10+
Bridging the gap between theoretical computer science and bare-metal mechatronics, this system processes data with extreme memory efficiency and makes physical actuation decisions based on textual similarity percentages.
11+
12+
### 📺 Live Demo & Output
13+
Here is the execution of the optimized engine running inside the Wokwi simulation environment, successfully analyzing file differences and triggering a mechatronic lock response:
14+
15+
![MicroDiff Simulation Output](docs/1.png)
716

817
## 🧠 Engineering Analysis: Space Optimization
9-
The standard dynamic programming implementation of the LCS algorithm requires a 2D matrix, resulting in a space complexity of $O(m \times n)$. On a standard microcontroller with severely limited SRAM (e.g., 2KB), this approach immediately results in a stack overflow or memory crash for even moderately sized texts.
18+
The standard dynamic programming implementation of the LCS algorithm requires a 2D matrix, resulting in a space complexity of `O(m * n)`. On a standard microcontroller with severely limited SRAM (e.g., 2KB), this approach immediately results in a stack overflow for large texts.
1019

1120
**The Solution:**
12-
MicroDiff implements a bitwise space-optimized approach. By recognizing that the calculation only ever requires the current and previous rows of the DP matrix, the algorithm continuously toggles between two rows using bitwise AND (`i & 1`). This drastically reduces the memory footprint.
21+
MicroDiff implements a bitwise space-optimized approach. By recognizing that the calculation only ever requires the current and previous rows of the DP matrix, the algorithm continuously toggles between two rows using bitwise AND (`i & 1`).
22+
* **Time Complexity:** `O(m * n)`
23+
* **Space Complexity:** `O(min(m, n))`
1324

14-
* **Time Complexity:** $O(m \times n)$
15-
* **Space Complexity:** $O(\min(m, n))$
25+
*Read the full mathematical breakdown in our [Algorithm Notes](docs/algorithm_notes.md).*
1626

1727
## ⚙️ Hardware Architecture
1828
The system architecture relies on minimal GPIO usage by leveraging serial communication protocols.
19-
2029
* **Processing Unit:** Arduino Uno (ATmega328P) showcasing aggressive memory management.
2130
* **Display Output:** 16x2 LCD operating over the **I2C protocol** to display analysis progress and match percentage.
2231
* **Physical Actuator:** PWM-controlled Servo Motor acting as a mechatronic gate/lock that physically reacts if the file variance exceeds a defined safety threshold.
23-
* **Data Pipeline:** Designed to read distinct data sets (e.g., `plan5` vs `plan6`).
2432

2533
## 📂 Repository Structure
2634
* `src/`: Contains the core C++ logic (`main.ino`) featuring the optimized algorithm.
2735
* `simulation/`: Includes the `diagram.json` mapping for rapid reproduction in Wokwi.
28-
* `data/`: Sample text targets utilized for difference analysis.
29-
* `docs/`: Project documentation and architecture details.
36+
* `data/`: Sample text targets utilized for difference analysis (`plan5_en.txt`, `plan6_en.txt`).
37+
* `docs/`: Project documentation, algorithmic notes, and architecture details.
3038

3139
## 🚀 How to Run (Simulation Environment)
3240
You can deploy and test this system entirely in the cloud without physical hardware:
33-
3441
1. Clone this repository.
3542
2. Open the [Wokwi Simulator](https://wokwi.com) and create a new Arduino project.
3643
3. Replace the default code with the contents of `src/main.ino`.
@@ -39,4 +46,4 @@ You can deploy and test this system entirely in the cloud without physical hardw
3946
6. Run the simulation to observe the text analysis, percentage calculation, and automated servo actuation.
4047

4148
---
42-
*This repository reflects a deep interest in algorithm design, operating system resource constraints, and hardware-level execution.*
49+
*Developed as part of academic coursework and research at **Amirkabir University of Technology**.*

0 commit comments

Comments
 (0)