Das Skript ist doch super ![]()
![]()
verstehe nicht was du meinst. Naja ich bin halt nen Anfänger.
Habe das Skript abgeändert das es auch auf dem Pi läuft
Code
import tkinter as tk
soll = 30
fenster = tk.Tk() #erzeugung eines Fensters
fenster.title("Steuerung Poolheizung") #Überschrift Fenster
fenster.geometry("800x480") # Fenstergröße
def plus():
global soll
soll = soll + 0.5
solltemp.configure(text=soll)
def minus():
global soll
soll = soll - 0.5
solltemp.configure(text=soll)
taste1 = tk.Button(text="+", command=plus, font=('Arial', 30),borderwidth = 5) # erzeugen der Tasten
taste1.place(x=130, y=30, width=70, height=70)
taste2 = tk.Button(text="-", command=minus, font=('Arial', 30),borderwidth = 5)
taste2.place(x=30, y=30, width=70, height=70)
solltemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
solltemp.place(x=230, y=30, width=100, height=70)
info1 = tk.Label(text="Soll",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info1.place(x=230, y=110, width=100, height=25)
starttemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
starttemp.place(x=30, y=180, width=100, height=70)
info2 = tk.Label(text="Pumpe",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info2.place(x=30, y=260, width=100, height=25)
schneckestarttemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
schneckestarttemp.place(x=160, y=180, width=100, height=70)
info3 = tk.Label(text="Start",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info3.place(x=160, y=260, width=100, height=25)
schneckeendetemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
schneckeendetemp.place(x=290, y=180, width=100, height=70)
info4 = tk.Label(text="Ende",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info4.place(x=290, y=260, width=100, height=25)
dachtemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
dachtemp.place(x=420, y=180, width=100, height=70)
info4 = tk.Label(text="Dach",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info4.place(x=420, y=260, width=100, height=25)
pooltemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
pooltemp.place(x=490, y=30, width=100, height=70)
info5 = tk.Label(text="Pool",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info5.place(x=490, y=110, width=100, height=25)
umgebungtemp = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
umgebungtemp.place(x=550, y=180, width=100, height=70)
info6 = tk.Label(text="Umgebung",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info6.place(x=550, y=260, width=100, height=25)
durchfluss = tk.Label(text=soll,bg = "#6CD300", font=('Arial', 30),borderwidth = 5, relief="sunken")
durchfluss.place(x=360, y=30, width=100, height=70)
info7 = tk.Label(text="Durchfluss L/h",bg = "#6CD300", font=('Arial', 12),borderwidth = 1, relief="sunken")
info7.place(x=360, y=110, width=100, height=25)
taste3 = tk.Button(text="Automatik", command=plus, font=('Arial', 25),borderwidth = 5) # erzeugen der Tasten
taste3.place(x=30, y=360, width=200, height=70)
taste4 = tk.Button(text="Pumpe An", command=plus, font=('Arial', 25),borderwidth = 5) # erzeugen der Tasten
taste4.place(x=250, y=360, width=200, height=70)
taste5 = tk.Button(text="Pumpe Aus", command=plus, font=('Arial', 25),borderwidth = 5) # erzeugen der Tasten
taste5.place(x=470, y=360, width=200, height=70)
tk.mainloop()
Display More