My project uses different sliders.
each slider must communicate the values 0/1/2/3/4 depending of the position of the slider. So I have set the value of each slider in the settings between between 0 and 4. Value are read by the “param.asInt();” function.
This worked fine.
Now I notice that when I move the slider instead of having the 5 integer values: 0/1/2/3/4 it gives me decimal depending on its position (for example I can put the slider on 1.09…) while I only want it to increment by integer. How can I force it to use only integer values?
I also notice that if I click on the line connecting the min and max output values in the slider property, i get a symbol in a circle in the middle of the line. What is the function of this?
I think you need to use Stepper Widget or Menu widget for selecting between predefined list of values. We just added to slider support of floats, so this changed it previous flow. However, param.asInt(); should return int anyway. Where do you get 1.09?
No way to implement this as an option?
I am not sure everybody will be happy to have the float values…
Stepper is not as convenient and much more expensive in terms of “energy”
(I use 20 steppers, this means that I will have to rewrite part of the project)
Sure, there is always a way. However, I don’t think this is right function for the slider, I may be wrong for sure. But let’s wait for other Blynkers feedback.
No if my stepper is set for instance at 3.57, the arduino does not recognize the value and the state of the controlled machine is not changed.
I use the sliders to control different machines and the slider allows to change and reflects the states for the machine:
0 = not existing
1 = out of order
2= in operation
3= iddle
4= start machine
The color of the slider change in accordance with the value (state of the machine).
With 20 machines, slider is much more user friendly. To start a machine, you just slide the slider to the right. Also give a much better visual feed back.
I think that a slider, should have “continuous” values exactly like a potentiometer. So float is perfectly fine (but with more precision than two decimals as it is now).
For discrete inputs there are steps and menu IMO.
I think Peter is right. It should be optional.
With the slider, it is very easy to see the actual value by the position of the slider.
With the stepper, you only have the value in small character on top of the stepper - not user friendly in my case…
I don’t agree, because there are already many options to input discrete and integer values, but no options for float or continuous values.
On the other hand I agree that an option could change the slider int<–>float and make everybody happy :).