Python transmit and receive

32 views
Skip to first unread message

Leonardo Guerrero

unread,
Dec 19, 2023, 10:43:12 AM12/19/23
to CupCarbon Forum
Hello everyone,

I'm trying to send a message and receive it using Python. When I ran the simulation the transmitter showed a 0 and a 1 with a red arrow to the other node, but I'm unable to get the message on the receiver. I tried a couple of messages like: "receive", "receive v", "getrx" and none of them worked the code stuck on input().

Transmitter

import time
while True:
print("send 1 5", flush=True)
time.sleep(1)
print("send 0 5", flush=True)
time.sleep(1)


Receiver

import time
while True:
print("receive", flush=True)
v = input()
print("print value"+v, flush=True)
time.sleep(0.2)


I hope you can help me, Thank you.

Reply all
Reply to author
Forward
0 new messages