Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter
#1
Dear Forum Users

I want to change the image of an LED from white to another color using Python3 code using a tkinter GUI. I understand how to do this with a button press but I want to evaluate the barometric pressure and, based on the magnitude of that pressure, change the color of the LED with python3 code and not a button press. Then the color would show up on the tkinter GUI

Can anyone tell me if this is possible and direct me to a site that would help me understand how to do that.

Thanks in advance for any help you can give.
Reply
#2
Can you show how you're doing this with a button press now?

One way to be to create a method that is passed in the object you want to update. It can poll the sensor, then add itself to the tkinter event queue with after() so that it will poll periodically.
Reply
#3
if you are receiving values from sensor then you can change led color according to values.
mostly u can receive sensor data from serial port.
Reply


Forum Jump:

User Panel Messages

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