Visibility property? ignore widgets if something else selected?

Hi there!

Hoping to use blynk for a project. It’s my first day, so I have a super newbie question.

I’d like to have an auto mode and a manual mode on my app. Auto mode will show environmental parameters only (and they were will adjusted automatically using set points). I’d like a switch (or tab, or menu selection, doesn’t matter really) that will enable manual mode which will show the same environmental parameters (so on the same pins) as well as some buttons and sliders to manually control outputs.

I tried tabs, but can’t keep the same labels on both tabs with the same pins.

A switch or menu would work, but only if there is a visible property on the “manual” widgets.

I’m not asking for someone to write out the code for me, just want to know if this is possible and maybe, if I’m lucky, a link to some documentation.

Thank you!

First, welcome to Blynk.

Yes just about everything is possible, and you are venturing into the “need to code” realm of customization.

However, short of much clearer objectives, finding the right documentation or examples will be best done by lots of Googling and reading others posts to help narrow down your questions to specifics… easier to get meaningful answers that way. :wink:

1 Like

Hey, as long as there is a way, and lots of coffee, I can figure it out! Maybe there are clues in the blynk library?

I’ll try it out. If I have more specific questions (I know this one was super broad), I’ll be sure to ask.

Thanks for the response!

I hear ya… it has been a caffeine fueled, Google filled, journey for me as well :slight_smile:

Clues imply purposefully hidden treasure… all treasure here is visible, if a bit spread out :wink: Have you looked into the Sketch Builder examples? (top right of this page).

1 Like

Haven’t yet. Didn’t know it existed! Will check it all out tomorrow with a fresh pair of eyes.

Many thanks! :slight_smile:

Here’s a hint in one direction for you

  1. Separate a virtual range for each tab, for tab1 use only V0-V9
    For tab 2 V10-V19
    And so on.

  2. If you want the same value to be sent to multiple value displays do multiple writes
    Blynk.virtualWrite(V0, myValue);
    Blynk.virtualWrite(V10, myValue);

  3. Add value widget in tab1 with V0 as pin, add value widget in tab2 with V10 as pin

As a side note, I’d like to remember a rule of thumb: don’t make more than 4 consecutive writes to blynk app in a row to avoid potential overflow, if you need to do more writes from the same function, for every 4 writes add simpletimer with timeout function
timer.setTimeout(300, writeSomeMore)

// call function f once after d milliseconds
    int setTimeout(long d, timer_callback f);

Right now there is no “disable” property for widgets. However it is in our roadmap. Checkout variant proposed by @Fettkeewl.

1 Like

This is brilliant. This will work perfectly.

Thank you!

1 Like