界面大概这样 当时忘了拍完 清明节假期结束前就要上交设计图纸QAQ

关注让 “紫雾凌寒” 来帮你回答,本回答结合 DeepSeek
如果还有问题,请评论或点击头像私信,如果有帮助到您, 请关注、采纳、点赞
import tkinter as tk
def start_motor():
print("电机启动")
def stop_motor():
print("电机停止")
def adjust_speed():
speed = speed_scale.get()
print(f"电机调速到 {speed}")
root = tk.Tk()
root.title("电机控制界面")
start_button = tk.Button(root, text="启动电机", command=start_motor)
start_button.pack()
stop_button = tk.Button(root, text="停止电机", command=stop_motor)
stop_button.pack()
speed_label = tk.Label(root, text="调速:")
speed_label.pack()
speed_scale = tk.Scale(root, from_=0, to=100, orient=tk.HORIZONTAL)
speed_scale.pack()
adjust_button = tk.Button(root, text="调整速度", command=adjust_speed)
adjust_button.pack()
root.mainloop()
希望以上解答对您有所帮助。如果您有任何疑问,欢迎在评论区提出。