Good day everyone, I’m doing a project where in an extension socket can be turn on and off using the blynk app and would also turn off when the temperature exceed 35C. Currently the “Styled button” in the blynk app is hooked directly with D11 (this is where my relay signal is connected too). My problem is when the temperature exceeds 35C and thus turning off D11 with DigitalWrite(11, LOW) the “Styled button” state remains in an “ON” state. I want the styled button state to be also “OFF” when pin D11 is turned off. Bare with me its my first time using arduino and blynk Should i first link the Styled button to a virtual pin? then connect it to a digital pin?
any help would be appreciated thank you
EDIT: ( FIXED)
for anyone who will stumble upon this too haha i’ve fixed it using
BLYNK_WRITE(0) // At global scope (not inside of the function)
{
int i = param.asInt();
if (i == 1)
{
digitalWrite(11, HIGH);
}
else
{
digitalWrite(11, LOW);
}
}