Activate Button

Would like to have a button active, able to be press, only when another virtual pin is ‘High’. Can’t seem to find away to do it. Ideas please.

Also looking for way to identify which Blynk user has pressed the button. Is there a way to do this in s ‘shared’ APP environment?


You will need code to create If(), boolean logic & flag checks. Then using Blynk.setProperty(vPin, “property”, value) you can “black out” a button to visually indicate an inactive state.

Not really… all logged in or shared users to the same project are treated as one, as far as widgets are concerned.

But I guess you could use Terminal to assign user codes that could be compared in code to sorta determine the correct user.

1 Like

How do I code this? I tried “onlabel and offlabel” but no difference. Button still shows in UI.


It will still show, but you can “blank” it out visually and lock it out via coding:

for example, this:

  Blynk.virtualWrite(V38, 21);
  Blynk.setProperty(V38, "color", "#00FF00");

  Blynk.virtualWrite(V39, "Inactive");
  Blynk.setProperty(V39, "color", "#3D3D3D");

Gets you this (will work on Virtual Buttons & LED’s as well):