Start a new topic

Global Variable linked to Actions on items

I'm having a little difficulty understanding where to put events and have them action from a global variable Perhaps someone could assist in my understanding


Say I have four items on a page

I want to send a number to a global variable(va0) on that page that determines, via an if statement, which ones are visible

so

if variable =1  the one item is visible 

if variable = 2 the two items are visible etc


I can code this with out a problem , but where should  the code reside and how is it actioned by the change in the variable value. .I put it in the postinitialise of the page but no joy when i change the global variable. There seems to be no where else to put it

I realize that I can do this direct from an Arduino, with sendCommand, but I am trying to speed up the interface by sending the least amount of instructions, ie one number instead of 4 sendCommands




1 Comment

Since a number does not trigger an event. then an event must be triggered


- timer is automatic after some defined period of time

- sendCommand with click obj,event

- pin on enhanced GPIO with binding


Two commands is less than 3 and 4, even if more than 1

Login or Signup to post a comment