I want to make an LED Display change color when the value updates.
I added the following script in the propertyChange event in Component Scripting. It appears to work fine in the Ignition Designer, but it flashes constantly when run as a client.
What am I doing wrong?
Or what is my misunderstanding about how the propertyChange event works?
################################
from threading import Timer
def doLater():
myItem.background = system.gui.color(255,255,255)
myItem.glyphForeground = system.gui.color(255,0,0)
myItem.glyphBackground = system.gui.color(255,255,255)
myItem = event.source
myItem.background = system.gui.color(255,0,0)
myItem.glyphForeground = system.gui.color(255,255,255)
myItem.glyphBackground = system.gui.color(255,0,0)
Timer(0.5,doLater).start()