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
@alantch: If I understand the description correctly you don’t want to change lables and limits but set values.
In this case blynk.setProperty() would not be an option.
@Gunner, your suggestion worked. Thanks for the help. I just wonder why there is so much less projects in Blynk using nodejs. Its kinda hard looking for code examples.
@Gunner, very nice of you to do this for the community. I do refer to it and the nodejs / javascript reference too every now and then. Your efforts are much appreciated.