Hub to PC communication #2406
Unanswered
danielm08097
asked this question in
Q&A
Replies: 2 comments 4 replies
-
|
The example at https://pybricks.com/projects/tutorials/wireless/hub-to-device/pc-communication/ shows both directions. On the hub, writing to stdout will send that data to the PC. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Hi Daniel? I did not struggle through all of the code lines, def send(msg):
print("try to send", msg)
try:
stdout.buffer.write((str(msg) + "\n").encode())
stdout.flush()
except Exception as exc:
print(f"Failed {exc}")
passRun shows: Maybe the reason no data is sent? Bert |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get a two way communication system without my non pybricks code on my pc and my pybricks script on my spike prime hub. I know theres already a tutorial online about hub to pc communication but I find it misleading and unhelpful because its not hub to pc but rather pc to hub. So I know how to get my pc to send commands to my hub but I can someone just help me figure out how to get my hub to simply say 'done' or something like that to my pc back. Any help is help, many thanks
Beta Was this translation helpful? Give feedback.
All reactions