Created
September 1, 2019 18:43
-
-
Save mattshirtliffe/a90ea0afe94a9413d04a2ccbdb5b74c7 to your computer and use it in GitHub Desktop.
getting spi data from zmq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import zmq | |
| # Socket to talk to server | |
| context = zmq.Context() | |
| socket = context.socket(zmq.SUB) | |
| socket.connect("tcp://localhost:5556") | |
| socket.setsockopt_string(zmq.SUBSCRIBE, 'SPI') | |
| while True: | |
| string = socket.recv_string() | |
| print(string) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment