Skip to content

Instantly share code, notes, and snippets.

@remyleone
Created July 25, 2017 17:14
Show Gist options
  • Select an option

  • Save remyleone/5c5d2edd45c90639ee785c0a82046094 to your computer and use it in GitHub Desktop.

Select an option

Save remyleone/5c5d2edd45c90639ee785c0a82046094 to your computer and use it in GitHub Desktop.
import zmq
zmq_inject_port = 60000
d = {"signal": "cmdToMote",
"data": {"action": ["imageCommand", "6pAdd", "[8,9]"],
"serialPort": "emulated2"},
"sender": "mySender"}
context = zmq.Context()
publisher = context.socket(zmq.REQ)
publisher.connect("tcp://localhost:%d" % zmq_inject_port)
publisher.send_json(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment