Python Forum
[Tkinter] Botton - Slide - Raspberry PI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Botton - Slide - Raspberry PI
#1
Hello,
I am looking for a good soul that can help me.

I have a python script, running on the raspberry.
I use 3 physical buttons (encoders)

I wish I could turn them into virtual ones, using some GUI tool.

I imagined 3 slide buttons on the screen controlling the raspberry via
ip.

That is, determine a fixed ip for the raspberry and update
through another computer (web) these parameters.

Would anyone know where to start?

def switch_event1 (event):
        global count1
        if event == RotaryEncoder.CLOCKWISE:
                #print "Clockwise"
                count1 = count1 + 5
                if count1> 90:
                        count1 = 90
                #print count1
        elif event == RotaryEncoder.ANTICLOCKWISE:
                #print "Anticlockwise"
                count1 = count1-5
                if count1 <10:
                        count1 = 10
                #print count1
        return

def switch_event2 (event):
        global count2
        if event == RotaryEncoder.CLOCKWISE:
                #print "Clockwise"
                count2 = count2 + 5
                if count2> 180:
                        count2 = 180
                #print count2
        elif event == RotaryEncoder.ANTICLOCKWISE:
                #print "Anticlockwise"
                count2 = count2-5
                if count2 <80:
                        count2 = 80
                #print count2
        return

def switch_event3 (event):
        global count3
        if event == RotaryEncoder.CLOCKWISE:
                #print "Clockwise"
                count3 = count3 + 5
                if count3> 220:
                        count3 = 220
                #print count3
        elif event == RotaryEncoder.ANTICLOCKWISE:
                #print "Anticlockwise"
                count3 = count3-5
                if count3 <150:
                        count3 = 150
                #print count3
        return
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020