aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sender.py8
-rw-r--r--__pycache__/utils.cpython-38.pycbin2542 -> 3263 bytes
-rw-r--r--utils.py1
3 files changed, 5 insertions, 4 deletions
diff --git a/Sender.py b/Sender.py
index cf933d3..d42cfe9 100644
--- a/Sender.py
+++ b/Sender.py
@@ -121,10 +121,10 @@ def receive_string(data, start_freq=18000, freq_step=250):
# Example usage
# data for the letter h
-# 01101000
-data = [18250, 18500, 19000]
-decoded_string = receive_string(data)
-print(decoded_string)
+# # 01101000
+# data = [18250, 18500, 19000]
+# decoded_string = receive_string(data)
+# print(decoded_string)
# transmit_string("h")
diff --git a/__pycache__/utils.cpython-38.pyc b/__pycache__/utils.cpython-38.pyc
index 01f5eb4..6a8e2eb 100644
--- a/__pycache__/utils.cpython-38.pyc
+++ b/__pycache__/utils.cpython-38.pyc
Binary files differ
diff --git a/utils.py b/utils.py
index 8de9eed..503d289 100644
--- a/utils.py
+++ b/utils.py
@@ -92,5 +92,6 @@ def receive_string(binary):
binary_string = ''.join(binary)
try:
print(chr(int(binary_string, 2)))
+ return chr(int(binary_string, 2))
except ValueError:
print("Error: Invalid binary data")