[SOLVED] Overwriting values from button


I read in a buttons value. After some logic I want to reset other buttons state. Is this possible? I tried it with writing that buttons virtual pin, but it remembers the old value.


You should probably share your code, along with details of the virtual pin setup and the results you are seeing.


Thank you for the response. I tried multiple things and it is solved now. Apparently BLYNK_WRITE only updates when the button is activated. So when you reset it via the logic, it will not update the ButtonStartDrup in my screenshot. So I have to write 0 to the button and to ButtonStartDrup.

But thank you anyway!


  // Set incoming value from pin V0 to a variable

  ButtonStartDrup = param.asInt(); 

That’s correct.

Also correct. You use Blynk.virtualWwrite(vPin,value) to update the widget value, but this doesn’t result in BLYNK_WRITE(vPin) being triggered. If it did then it would be very easy to create a infinite loop of one command triggering the other.

When you post code, screenshots, compiler error messages etc in future, please don’t post screenshots. Instead copy the text and paste it between triple backticks so that it displays correctly.


Updated it. Thank you!

1 Like