About Virtual Pin to creators

Dear creators. I need function like BLYNK_WRITE(*) but all virtual pins write must call one function. Inside function i need get virtual pin which the write.
How it can be implemented?

The only way I see with current BLYNK API is just declare all possible VIRTUAL_WRITES. Maybe @vshymanskyy could suggest something else.

EUREKA!!!. I look in blynk library code and find BLYNK_WRITE_DEFAULT()

BLYNK_WRITE_DEFAULT()
{
BLYNK_PRINT.println(“virtual pin write”);
BLYNK_PRINT.println(request.pin);
BLYNK_PRINT.println(param.asInt());
}
It’s worked perfectly.

2 Likes

Hm… Lol. it was added recently. Forgot about it. Nice finding!

It’s also in the documentation :wink: