Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. vals = []
  2. for i in range(1,60):
  3. vals.append(readSerialConv())
  4. print("\n\nsend: datatime:" + val1 + ", value:" + str(vals) + "")
  5. MSG_TXT = "{\"timestamp\":\"" + val1 +"\",\"deviceid\":\"MyFirstPythonDevice\",\"values\": " + str(vals) + "}"
  6. msg_txt_formatted = MSG_TXT
  7. # messages can be encoded as string or bytearray
  8. if (message_counter & 1) == 1:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement