Используя itemconfig
я решил проблему. Вот окончательный рабочий код.
import serial
import time
from tkinter import *
import math
##------------------------------------------##
##------------------------------------------##
ser = serial.Serial('COM5',baudrate = 9600)
ser.flushInput()
##------------------------------------------##
## This function retrieves values from Serial ##
##------------------------------------------##
def con():
ser_bytes = str(ser.readline().decode('ascii'))
datasplit = ser_bytes.split(',')
x = int(datasplit[0])
y = int(datasplit[1])
z = int(datasplit[2])
return x,y,z
##------------------------------------------##
## Creating and Updating arcs for animation ##
##------------------------------------------##
def tilt():
x,y,z = con()
c.itemconfig("rect",start = x) # Updates values of arcs start angle.
c_1.itemconfig("rect",start = y)# "rect" acts as a comman tag
c_2.itemconfig("rect",start = z)
root.after(100,tilt)
print(x,y,z)
##------------------------------------------##
## Main geometry and setting goes here##
##------------------------------------------##
root = Tk()
root.title("Control Panel")
root.geometry('1200x750')
frame_1 = Frame(root)
frame_2 = Frame(root)
frame_3 = Frame(root)
frame_1.grid(row = 0,column = 0)
frame_2.grid(row = 0,column = 1)
frame_3.grid(row = 0,column = 2)
c = Canvas(frame_1,width = 200, height = 200, bg = '#5F9EA0')
c_1 = Canvas(frame_2,width = 200, height = 200, bg = '#5F9EA0')
c_2 = Canvas(frame_3,width = 200, height = 200, bg = '#5F9EA0')
c.pack()
c_1.pack()
c_2.pack()
x = 0
y = 0
z = 0
arc = c.create_arc(1, 1, 200, 200,start = x,extent=-180, fill="red",tags="rect")
arc_1 = c_1.create_arc(1, 1, 200, 200,start =y,extent=-180, fill="red",tags="rect")
arc_2 = c_2.create_arc(1, 1, 200, 200,start =z,extent=-180, fill="red",tags="rect")
tilt()
root.mainloop()