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