void loop(void)
{
int value = client.getValue("57d164ef762542127772a44");
delay(1000);
Serial.println("Got this before while:");
Serial.println( value);
while( value > 0 ){ // Button on
int value = client.getValue("57d164ef762542127772a44");
delay(1000);
Serial.println("Got this inside while:");
Serial.println( value);
}
}
But even after value changed back to 0 its seems to stuck inside while loop:
You're creating a new variable named value inside the while loop. It's not the same variable you're checking as the condition. The one you're using for the condition never gets updated. It's not the same one you see printed. The one you're printing is the new one.
Lise the "int" in front of value in the while loop. Putting the type creates a new variable. Two variables with the same name is almost never a good idea.