certain-death
Posts: 13
Joined: Thu Jul 31, 2014 11:55 pm

Webiopi Change Button Label

Sun May 24, 2015 7:35 pm

hi,

I am looking for examples on how to change a Button label in webiopi depending on the GPIO pin state. I have tried searching but can't seem to find anything that shows a simple example of how to utilise the setLabel function.

I have two uses for this the first is to change the label of a button that controls an LED so that the button will read "ON" or "OFF" depending on the LED's state.

The other is to read the state of a switch "OPEN" or "CLOSED" again depending on if the GPIO pin state is high or low.

I have the buttons changing colour from red to green for these functions, just need to sort out the label.

Any help, examples or links to examples would be most appreciated.

Thanks

Ian

southpaw
Posts: 52
Joined: Wed Nov 30, 2011 2:23 pm

Re: Webiopi Change Button Label

Wed May 27, 2015 8:01 pm

some useful info in this link mate
https://code.google.com/p/webiopi/wiki/CUSTOMIZE

Return to “Automation, sensing and robotics”