Send negative value and Text strings

Ok, now that I understand how thw as well work behind the curtains…

Since a Virtual Pin is just a variable the App request s from the board it should be possible to have the user enter strings in the app which are send to the board and the other way around.

Is this already implemented e.g. for showing specific messages in the app which aren’t predefined?

(BTW… If Virtual Pins would be named “variable” it would be lot easier to understand the concept for newbies in Blynk! No need to name it Virtual Pin to make it seemingly easier for beginners, this complicates things since you first need to understand what a VT is! But any beginner knows and needs to know anyway what a variable is! So I would appreciate it if you could change the name and also add other types of variables as asked above. Just in case It’s not already)

I did calculate a number (0-100) which is sent to History Graph. But there’s numbers outside of this range.

I could constrain() them but as I thought more about this it would be even beneficial to see if they exceed the calibration range I defined…

So what does a Widget if it gets negative value or some above maximum set in the widget?

As somebody asked if more virtual pins would be available the Blynk programmer (just dont have his name) asked if he even used the ones that are available.

My first project is a plant monitoring with MANY parameters and sensors, therefore as much widgets.
I already use around 29 virtual pins mostly for control or calibration. I got the 3 tabs possible nearly all 100% filled with readings (TAB1) Settings (TAB2) and Calibration (TAB3).

So I do think as well there should be more Tabs and Pins.
This will work out for my actual project but on the knives edge!

(and no, I don’t show all sensor individually (I got 16 Sensor for plant moisture alone. I calculate just 2 and show them in my app. But even with this I nearly ran out of Space / virtual pins).

Lots of what you ask can be found by reading the available info on this forum… For example some hardware can have 128 virtual pins (and yes they are “virtual pins” by every accepted definition of those two words)

1 Like

@Gorkde as @Dave1829 points out the info is on the forum and there couldn’t be anything simpler than a virtual pin.

There are digital pins, analogue pins and with Blynk, virtual pins. I suppose if English is not the first language for a Blynker there could be some confusion but if you were to ask Google what virtual means it states:

COMPUTING: not physically existing as such but made by software to appear to do so.

For very basic use of Blynk, say turning an LED on and off, you wouldn’t need to know what a variable is, but obviously it helps if you do.

128 pins has been available for certain hardware for quite some time. Which hardware are you using?

Unless you add code to your sketch then the history graph will show negative values so add the appropriate code.

1 Like

I’m using the Uno for prototype, later promini.

And I read, that is why I stumbled about the 32 pin limit.

Also I do understand what virtual means but since the Blynk app/Software really uses a variable that is just called “Pin” you could easily transfer other data as String when the App supports it, that’s why I asked!

Also, I assumed the history would show negative but what about Widget like gauge etc, wger you git a defined range of 0-100 for example?

What uf they get -20?

Will they show it or just set it to zero?


You can change the incoming data range in every input widget in the settings. Or am I oversimplifying? Just set it to -100 to 100 or whatever. You can even turn ON mapping ( an icon between min/max values) You can read about mapping in the docs.

I’d agree with Costas. The idea behind V pins is that it’s another type of channel. Digital, Analog, Vitlrtual.

Variable is something dynamic, while pin is a fixed thing. It’s always there, almost like a physical one, but not :wink:

Ok I didn’t know one can set the Widget to negative as well…

Sure I understand the idea of Virtual Pins but in essence its just another name for the variable that the Blynk.virtualwrite() sends to the app correct?

So if you would just allow any variable type to be sent instead only numbers it would open way more possibilities for widget’s (showing text, asking the user for entering text which the Arduino then could displa and so on - Just some examples)

About the mapping…

I do my mapping already at arduino side with the Map().

But there’s something about mapping in the App I didn’t understand and which isn’t explained in the docs as well:

To map you need a range to map from and a rage to map to. In the App as soon as I click the mapping icon the range is replaced by mapping range.

So will the incoming range be 0-1023 as the manual suggests somehow or do the values matter that could ve entered BEFORE I press the mapping button?

Also about VP. The uno has only 32, as I asked up there right? Why got other 128? But not the uno? Should be no hardware dependency right?

You can’t even imagine how many human errors this would cause… :slight_smile: Clearly you never worked at Blynk support, haha

Mapping is pretty basic in Blynk . It either maps 0-255 for OUTPUT widgets to your values, or maps the Analog range, which is dependant on HW ( usually 0-1023) to your values.

The only reason the limit exists is hardware limitations. You’ve seen the UNO specs, right? :wink:

Yeah probably would cause more support questions :wink: But would be a great feature!

Hardware limitations on Virtual pins? I can’t understand how the hardware could ever limit VIRTUAL pins, chickens, dogs or whatever?

They are virtual, and as I assume in reality only a variable to be sent back and forth.

So why should there a hardware limitation on a number of variables you define?

Is that about available memory?

And thanks for the mapping explanation, this should be mentioned in the manual :wink: