Arduino Model: Arduino Uno with Ethernet Shield (W5100)
The slider widget is not producing the correct values.
When the Slider is at a position which "displays" a value of 1.0, the actual value being sent to the Arduino is a value of 1023.
Actual value = Displayed value x 1023
Let me show you:
First - we have to create a slider widget (as per the picture below)
Please note - that I am using Virtual pin 0 (V0) to record the value of the slider within the Arduino sketch. Also note that I want the slider to have a range from 0 to 1023, as per the screenshot above.
Once added, it should look like this:
And if I slide it to the maximum value of 1023, it should look like this:
Ok - all good so far.
So now let us retrieve the value of the slider, by assigning the slider "value" to Virtual Pin 1 (V1).
We will display that value on the dashboard next to the slider.
Here is how to make that:
And this is what it should look like:
And that looks fine - UNTIL you move the slider. (See example below):
Ok - that did not seem right. So I decided to change the maximum value on the slider to 4.
And here are the results for the first 4 numbers:
As you can see, the value of the slider is moving up in multiples of 1023.00
Here is the Arduino Sketch that I used: