Virtual pins out of 0-127 range are be supported only via BLYNK_WRITE_DEFAULT() / BLYNK_READ_DEFAULT()
API
https://docs.blynk.cc/#blynk-firmware-blynktimer-blynk_write_default
There are no plans to support more than 128 pins on fw level via “easy API”.
The docs are updated
1 Like
Gunner
November 18, 2018, 9:15am
12
I never figured out how to use more than one of those functions at a time anyhow
And while this is @mars Topic… now I am curious… what does this have to do with when the official use of up to 255 virtual pins (using the normal functions) begin? Next Library release?
1 Like
Gunner
November 18, 2018, 9:34am
13
vshymanskyy:
The docs are updated
I had to hunt for this So for anyone curious…
Note: For virtual pins with numbers > 127, the V128
syntax is not available.
Please use plain virtual pin number, for example:
Blynk.virtualWrite(128, "abc");
1 Like
fine !
@Gunner I use
Blynk.virtualWrite(128, "abc");
@Gunner no the BLYNK_WRITE()
syntax will not be supported for pins > 127.
Gunner
November 18, 2018, 10:11am
16
Ah, OK… I think that is where the assumptions started… that it was just code as normal, but now with MOWR vPins
mars
November 18, 2018, 10:21am
17
thanks for that.
Just curious, is there a particular reason why
BLYNK_WRITE
is not supporting for vPIN > 127 ?
I tried
BLYNK_WRITE(V228) {
without
#define BLYNK_USE_256_VPINS
that runs too
mars
November 18, 2018, 12:02pm
19
interesting - does that seem to be in contrary to @vshymanskyy advice a couple of threads back ?
I don’t know, it works for me as described
maybe @Gunner tell us more ?
Gunner
November 18, 2018, 12:24pm
21
Ha… I don’t know… I am all bossy, not all knowing (shush, don’t tell anyone ) I thought that this was a system wide expansion of vPins for normal use, not a partial update that has strange use cases and rules. But then even with my MEGA testbench, I never exceed 80 consecutive vPins anyhow so I never looked into it until I saw this topic.
1 Like
No it does not work The fact that it compiles doesn’t mean it works.
1 Like
@mars it would increase memory usage.
1 Like
yes , it does not work, nothing is displayed on my label widget , really bad
Clucas
December 25, 2018, 9:51pm
25
Hello @vshymanskyy @Dmitry I am just curious if this functionality will be released on the next Blynk Library maybe V0.5.5?
Please read my comments above. Especially:
gab.lau
December 27, 2018, 7:17pm
29
The BLYNK_WRITE_DEFAULT() function handle virtual write for all pins > 127, this is a small example to manage pins 181 and 190:
BLYNK_WRITE_DEFAULT()
{
int pin = request.pin; // Which pin has trigger write
int value = param.asInt(); // Use param as usual.
//only for debug
Serial.print("virtual write pin: ");
Serial.print(pin);
Serial.print(" value: ");
Serial.println(value);
//handle pins actions
switch(pin){
case 181:
//your custom code for pin 181
Serial.println("TODO 181");
break;
case 190:
//your custom code for pin 190
Serial.println("TODO 190");
break;
}
}
Best Regards
4 Likes