graph/test/test.py

16 lines
270 B
Python
Raw Normal View History

2024-05-15 20:52:13 +00:00
#!/bin/env python3
import requests
from math import sin
from time import sleep
def main():
x = 0.0
while True:
requests.get(f"http://localhost:8080/add?chart=0&series=R1&x={x}&y={sin(x)}")
x += 0.01
sleep(0.01)
if __name__ == "__main__":
main()