Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2016 14:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Overdrivr/9a7582e4bd710b45e0e9 to your computer and use it in GitHub Desktop.
Print received values from a telemetry-enabled serial connection using pytelemetry
import pytelemetry as tm
import pytelemetry.transports.serialtransport as transports
import time
def printer(topic, data):
print(topic," : ", data)
transport = transports.SerialTransport()
c = tm.pytelemetry(transport)
options = dict()
options['port'] = "COM20"
options['baudrate'] = 9600
c.subscribe(None, printer)
timeout = time.time() + 3
while True:
if time.time() > timeout:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment