I want to set default values for some of my widgets each time the project is run in the Blynk App. Types of widgets used are menu (4 selections), button (on/off) and segmented switch settings (5 selections). What I want to achieve is to always have the widgets revert to the following defaults each time it is run : the first option of the menu selected, Off for the button and option 3 selected for the segmented switch, even though the selections might have changed from a previous run session.
Code is written in nodejs. Snippet of code below :
var v0 = new.blynk.VirtualPin(0); // menu selection
var v1 = new.blynk.VirtualPin(1); // Button
var v2 = new.blynk.VirtualPin(2); // segmented switch
blynk.setProperty(v0, “label”, “menu”, “min”, 1)
blynk.setProperty(v1, “label”, “State”, “min”, 0)
blynk.setProperty(v2, “label”, “menu”, “min”, 3)
Above setProperty does not seem to work. How and what is the correct method to do what I intend. Or am I using the wrong command?