Team Candy Queen's submission for IEEE Embedathon 2025.
Team members :-
| Idx | Name | Roll No. | Contact |
|---|---|---|---|
| 1 | Ashmit | 231EC109 | ashmitrsambrani.231ec109@nitk.edu.in |
| 2 | Asrith | 231EC110 | asrith.231ec110@nitk.edu.in |
| 3 | Ranjit | 231EE159 | ranjittanneru.231ee159@nitk.edu.in |
| 4 | Rudra | 231EC147 | rudra.231ec147@nitk.edu.in |
- First install esptool.py
pip install esptool- Get the whole firmware that was loaded onto the esp32-id ;)
python -m esptool --port COM6 read_flash 0x0 0x400000 firmware_backup.binpython -m esptool --port COM6 write_flash 0x0 firmware_backup.bin- Reading the firmware: Using a hex editor like hxd, we could view the whole firmware and things written to it.
Here is what we found:
This is the output we receive:
Keys in namespace 'Passwords':
Key: line0, Type: 33
Value (string): �?=18141312131254144313133
Key: line1, Type: 33
Value (string): �?=1711131213131415111313121312131
Key: line2, Type: 33
Value (string): �?=16131211141314141312131213121
Key: line3, Type: 33
Value (string): �?=16131225541413124313133
Key: line4, Type: 33
Value (string): �?=1652111413141452111413161
Key: line5, Type: 33
Value (string): �?=1613121213131414131212131312131
Key: line6, Type: 33
Value (string): �?=521312131213141413121313343
Done listing keys and values.Using this code we could read the value from NVS.
Stored value for line0: �?=18141312131254144313133
Stored value for line1: �?=1711131213131415111313121312131
Stored value for line2: �?=16131211141314141312131213121
Stored value for line3: �?=16131225541413124313133
Stored value for line4: �?=1652111413141452111413161
Stored value for line5: �?=1613121213131414131212131312131
Stored value for line6: �?=521312131213141413121313343#include <Preferences.h>
Preferences preferences;
void setup() {
Serial.begin(115200);
if (preferences.begin("Passwords", true)) { // 'true' is for read only mode
for (int i = 0; i <= 6; i++) {
String key = "line" + String(i);
String storedValue = preferences.getString(key.c_str(), "default_value");
Serial.println("Stored value for " + key + ": " + storedValue);
}
} else {
Serial.println("Failed to open preferences.");
}
preferences.end();
}
void loop() {
}From the Problem Statement Document:
A mysterious sequence of digits, such as 13125216175, has
been transmitted by the ESP32. It appears to encode a hidden
visual pattern.
The sequence alternates between two roles, guiding the
structure of the pattern.
Your task is to interpret these numbers and reconstruct the
encoded representation.
visual patternindicated that there was definitely use of plotting techniquesThe sequence alternates between two roles, guiding the structure of the pattern.This meant we needed to alternate between the two symbols here we took as*and- For the even index we used
*andfor odd index - We used the pattern for each line and got the outut LAKHTARUS which is the reverse of SURATHKAL
- So now we know to expect LAKHTARUS on the receiving computer.
- On the ESP we have a websocket running which takes the Key values from NVS of the ESP and converts it to readable format using the Preferences library.
- It then sends the data to the computer which decrypts it.
- This is the code which does this.
- On the Receiving PC we have a python script which has 2 main functionalities.
- First part of the script deals with receiving the data from the websocket. Once it's received it, it stores it in a string and prints out that string for verification purposes.
- Second part of the script deals with decrypting the data received from the websocket. Once we have stored the received data in a string, we parse through it and print
*andaccording to the rules established in manual decryption part. - Upon performing this action, this is the output received.
This is the code which performs all this. To run this code follow the following steps:
- Change the ssid and password in transmit_password_websocket to the ssid and password of your network.
- Upload the code in transmit_password_websocket onto your ESP32.
- Press the reset button on your ESP32
- Clone the repo to a location of your choice on the receiving pc and change directory to that location
- Run
/final_task/milestone2/receive.py
Click on this link for a demonstration video: https://github.com/user-attachments/assets/2d24559f-222d-41d2-809e-943fc90f1c7d
Same as whatever was done in milestone 2. The message is received over WiFi and deciphered. Upload the updated ESP32 code onto your ESP. Located in ./final_task/milestone3/transmit_password_websocket/transmit_password_websocket.ino
The decrypted data is converted to a list of 20 matrices, each one representing a single letter. Since our word is "LAKHTARUS", only 9 of the 20 letters are used. Each letter is a matrix of 1s and 0s, 1s representing a star and 0s representing a space.
This data is sent to the ESP32 server.
The data is received in a JSON format, and the data is reconstructed into a matrix of size 8x160 (8x8 per letter) consisting of 1s and 0s where 1s represent LED ON and 0s represent LED off.
We have a temporary matrix of 8x8 which iterates throught the columns of the first long matrix. At each iteration we send the output of the temp matrix to our LED matrix for display. When the temporary matrix is full of 0's, it resets back to the beginning.
- Connect according to pin diagram; for detailed connections refer connections
-
Using this test all led we could run all leds one by one
-
Now, we discover an issue with the LED Matrix. We cannot display the whole letter at once. We can demonstrate this using an example. Let's say you wanna turn on points((1,2),(1,6),(3,4))
To do this, we need to turn on column 2,4 and 6. We will also need to turn on row 1 and 3. However, when we do this, we turn on (1,4), (3,2) and (3,6). To prevent this we use scaninng. -
So, we turn on necessary LED's in only one row at once. First line is turned on, and after a tiny delay of 1ms, second line is turned on and so on. This effectively appears as a whole to our eyes because of our human image retention time of 16ms. So we effectively achieve a sliding text effect on our LED matrix.
-
Done!!!


