Add details :
• NodeMCU
• IOS, Android
• Blynk server
Hi everyone!!!
How can I get the value of the button position when the code starts?
For example - I have a code
BLYNK_WRITE(V1) { int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable //Action Serial.println("I'm trying to open/close the window"); Serial.println(pinValue); if (lmw1 != 0 && pinValue == 0){ Blynk.virtualWrite(V1,1); return; } if (lmw2 != 0 && pinValue == 1){ Blynk.virtualWrite(V1,0); return; } if (pinValue == 1) { window_open_1(); } if (pinValue == 0) { window_close_1(); } }
if the device rebooted - i need to get the state of the button, but I don’t wont to run on start the procedures window_open_1 and window_close_1.
If I use synchronization, it will run the BLYNK_WRITE(V1) and the procedures will run again.But I need to get just state of the button.
Please, help me