Blynk 2.0 Blynk.virtualWrite Array

Hi @Dmitriy, I’m wondering if you could please confirm that the following Blynk legacy feature (send values as an array) is currently working in Blynk 2.0?

Blynk.virtualWrite(pin, "hello", 123, 12.34); // Send multiple values as an array

The reason why I ask is because i’m in the middle of transitioning existing projects to Blynk 2.0 and it appears the array values aren’t stored atm. :thinking:

Kind Regards, GG.

According to the documentation, it’s possible.
How did you configure your datastream ?
Take a screenshot please.

Hi @John93, Thank you for replying…here is my screen shot for one of the data streams i’m wanting to store array data,

Try to change data type to string.

1 Like

Thank you @John93. This is working now. Problem solved. :+1:

Your welcome buddy :+1:

Hello. Right now it’s possible to store the array only via String datastream type. Another option is Location DS (for coordinates) - it is stored as [double, double].

We’re thinking about special Array DS, however, this is not yet finalized. Could you please tell us your use case?

Hi @Dmitriy, I’m using the virtual pin array to store numeric values obtained once a day for a 7, 14 and 28 day period. In addition to this i’ve integrated a circular buffer (CircularBuffer - Arduino Reference) to push the values each day at the same time so that I have the most recent value (yesterdays value) shown first followed by the previous days. Works really well. Once I iron out all the Blynk 2.0 minor issues I will post a project. Its an Energy Monitor that allows the user to input electricity prices and monitors electricity usage and will show a daily cost for electricity (or profit if you have a solar system).