enter image description here
i hope you guys can help me
I haven’t found a way out of all this for several hours, I’ve searched all the way to the root but there’s no enlightenment
screen = Tk()
screen.geometry("300x200")
var = DoubleVar()
isSweep = False
def servo_handler(angle):
if not isSweep :
print(angle)
servo.write(angle)
def sweep():
servo_angle = 0
for angle in range(180):
servo_angle = angle
servo.write(servo_angle)
time.sleep(0.5)
isSweep = False
button_OK = Button(screen, text="Sweep", command=sweep)
button_OK.pack(anchor=CENTER)
w = Scale(screen, variable=var, orient=HORIZONTAL, from_=0, to_=180)
w.pack(anchor=CENTER)
screen.mainloop()
this is the code bro please help
New contributor
CLAWS 258 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.