Created
June 23, 2023 21:01
-
-
Save JoeFurfaro/23a6f90ff4492943b5b7040cc9dcab50 to your computer and use it in GitHub Desktop.
This file contains 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 requests | |
import time | |
import json | |
# Get the cell meta | |
resp1 = requests.post("http://10.99.12.100:8000/api/addons/atom/services/GetCells") | |
print(resp1.json()) | |
time = int(time.time()) | |
data = json.dumps([{"time": time, "cycleTime": 10.34, "weldTime": 5.56}]) | |
# Post some new results to TestCell (ID = 2, as obtained above) | |
resp2 = requests.post("http://10.99.12.100:8000/api/addons/atom/services/AddDataPoints", {"cell": 2, "data": data}) | |
print(resp2.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment