Team Byte Brigades's submission for IEEE Embedathon 2025.
Team members :-
Idx | Name | Roll No. | Contact |
---|---|---|---|
1 | Mukul | 231EE134 | mukul.231ee134@nitk.edu.in |
2 | Soham | 231EE142 | soham.231ee142@nitk.edu.in |
3 | Ratan | 231EC146 | ratan.231ec146@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 com11 read_flash 0x0 0x400000 firmware_backup.bin
python -m esptool --port com11 write_flash 0x0 firmware_backup.bin
line0: �?=18141312131254144313133
line1: �?=1711131213131415111313121312131
line2: �?=16131211141314141312131213121
line3: �?=16131225541413124313133
line4: �?=1652111413141452111413161
line5: �?=1613121213131414131212131312131
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(" " + 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 pattern
indicated 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
*
and - 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
*
and - Upon performing this action, this is the output received.
** 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
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;
-
Using this test all 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 scanning -
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!!!