Repozitář pro studenty 3.ročníku zaměření 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.
 
 

18 lines
428 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?").lower() == "q":
break