I am trying to read the brightness parameter of blue Led of omega2 to use it in a variable to use this to manage a led in my frontplate of my box with omega 2lte. I do not know what i do wrong. here is the essential part of the python script I use:
while True:
w = os.system("cat /sys/class/leds/omega2lte:blue:wifi/brightness")
if w == 255:
status2 = "connected"
status = gpioObj.setValue(0)
print(status2)
The frontplate shows if I am connected to my application via mobile ( iot ) or via wifi, if there is no good radio connection to mobile iot
If I look in logread I see that the cat command shows the correct value of 255 and but the ïf in the programm does not see the variable.
Van some body help me with this?