Добрый день.
На сколько я узнал, сейчас чтобы записать 50 виртуальных пинов, программка должна выглядеть как
Blynk.virtualWrite(1, 123);
Blynk.virtualWrite(2, 123);
Blynk.virtualWrite(3, 123);
Blynk.virtualWrite(4, 123);
…
Blynk.virtualWrite(50, 123);
Реализована или планируется ли реализовать вариант команды
Blynk.virtualWritePinArray(7, 123, 5555, 234, 564, 667);
где получиться, что
V7=123,
V8=555,
V9=234,
V10=564,
V11=667
Заранее спасибо за ответ
But to send to multiple pins in a more compact way you can try using an array and for loop
Something like this will allow using sequential or nonsequential vPins… Untested.
int vPinArray[] = (7,123,8,555,9,234,10,564,11,667); // vPin then value
for (byte i = 0; i < 11; i = i + 2) {
Blynk.virtualWrite(vPinArray[i], vPinArray[i+1]); // pull vpin and value from array and process
}
Thank you for answer. But, what about comments in official files like this:
timer.setInterval(1000L, sendUptime); // Here you set interval (1sec) and which function to call
}
void sendUptime()
{
// This function sends Arduino up time every 1 second to Virtual Pin (V5)
// In the app, Widget's reading frequency should be set to PUSH
// You can send anything with any interval using this construction
// *Don't send more that 10 values per second*
Your example will send 50 values(request to server) in very short time.
I case of 3 such device, situation came much more worse.
In other words, you say, that I need to send “book” by simbol instead to send whole “book” by one message.
Each project can have several devices (I have 6 now) with each own unique AuthToken.
Each device can use up to 255 vitruals Pin.
Sending one by one many virtual pins is not effective solution for communication and server load.
It is ok for slow data update. But in case if I need to make curve for many parameters with second step, it is not possible now.
This is the mater, why I ask Blynk team about plan to make command for sending pins array.