diff options
-rw-r--r-- | Sender.py | 8 | ||||
-rw-r--r-- | __pycache__/utils.cpython-38.pyc | bin | 2542 -> 3263 bytes | |||
-rw-r--r-- | utils.py | 1 |
3 files changed, 5 insertions, 4 deletions
@@ -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 Binary files differindex 01f5eb4..6a8e2eb 100644 --- a/__pycache__/utils.cpython-38.pyc +++ b/__pycache__/utils.cpython-38.pyc @@ -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") |