Step Widget - Range Setting Issue - Needs decimal point in range settings

I’m trying to set a range of 3 to 4.5 using step 0.1. In code, I’m doing a param.asFloat() on the assigned virtual channel and getting reasonable numbers. Note: iPhone application.

The values sent from the widget range from 3 to 4, not up to 4.5.After opening the control again, I see the upper range is being rounded down i.e. set to 4. Doesn’t this control allow decimal range values?

Can you supply a bit more detail… show sketch and explain what the receiving widget is and how you have it set as well.

Its a Step V widget with the following settings:

  1. Output = V6
  2. Lower range = 3 , Upper Range = 4.5 <–trying to set it to this
  3. Values are not mapped to range
  4. Step = 0.1
  5. Send Step=OFF
  6. Loop Values=OFF
  7. Icons +/-

Not much more I can explain… QUESTION: can range values be decimal numbers?

SNIPPET FROM SKETCH.

BLYNK_WRITE(V6)
{
	Serial.println(String(param.asFloat()));
}

The claritfication helped :wink:

No, you can not set decimals in the range; However, you can easily account for it in code.

BLYNK_WRITE(V32)
{
  if (param.asFloat() < 4.6) {
    Serial.println(param.asFloat());
  }
}

Thanks for getting back. I hope this functionality can be added.

The problem is the widget gets updated with the new value. For example, setting the range-> 3 to 5 allows getting values up to 4.5. Problem, the user can keep hitting the + and the values go out of the desired range as displayed on the widget.

Here is a piece of code to force the range but creates excess traffic (a hack)…You will also see the widget jump to 4.6 then get forced back to 4.5, not the preferred way. Bottom line, if the widget was created to allow precision control, the range values should accommodate that philosophy as well. :ok_hand:

BLYNK_WRITE(V6)
{
	float vin = param.asFloat();
	if (vin > 4.5)
	{
		Blynk.virtualWrite(V6, 4.5);
		VIN_TRIP = 4.5;
	}
	else VIN_TRIP = vin;
}
2 Likes

We will take a look, should be an easy fix.

1 Like

Thanks a bunch… Please notify me if/when such a change occurs.

It will show up on an announcement topic as a New App Release

We can’t personally notify unfortunately. Just keep an eye on app updates.

BTW, are you on iOS or Android?

I’m developing the app. on an iphone but will clone it for a client that is running an android.

I’ll keep my eyes open and thanks again for the Great Support :+1:

When you say client, you mean it’s a commercial application?

Its just a one-up app. to provide a remote method for resetting some equipment. I’m always looking for ways to spread the Blynk. Its nice to know you do have the abilty to publish native apps. for upward scale mobility.