[SOLVED] Writing to a slider Widget?

I got a slider connected to a virtual pin which sets data in my code.

On initialization I would like to write a value to that virtual pin to set the slider to it’s initial value. Will that work?

Once you have confirmation that you are connected to the Blynk server in setup() you just need:

Blynk.virtualWrite(VPin, valueforslider);

If you want to initialise to the last value on the slider it is:

Blynk.syncVirtual(VPin);

Or sync all virtual pins in setup() or elsewhere with:

Blynk.syncAll();

Thanks!..

Is it possible to change the maximum value of the slider?

Yes. Via set property feature - http://docs.blynk.cc/#blynk-main-operations-change-widget-properties

But normally it’s better to do it with code rather than directly in the slider.

If you set max to 10,000 you haven’t a hope in hell of selecting 9500, or any other specific number.

Ranges of 0 to 10 or 0 to 100 at a push are more manageable and then you can just multiply the value up in your code.

A post was split to a new topic: How can user update desired temperature online, without needing to change the data in the script?