Repozitář pro studenty IVE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
426 B

import serial
import matplotlib.pyplot as plt
ser = serial.Serial("COM3", 9600)
num_values = int(input("kolik dat načíst?"))
values = []
while True:
for i in range(num_values):
line = ser.readline().decode("utf-8").strip()
name, value = line.split(":")
values.append(int(value))
print(i)
plt.plot(values)
plt.show()
values = []
if input("q?") == "q":
break