I’ve never has to use BLYNK_WRITE_DEFAULT(), but according to he who knows everything, its not quite the way you’ve described:
In the example @Gunner gives, it seems that request.pin
returns the pin that triggered the BLYNK_WRITE_DEFAULT()
callback:
BLYNK_WRITE_DEFAULT() {
int pin = request.pin; // determines what vPin is triggering this response
if (param.asInt() == 1) {
Serial.print("Button on Virtual Pin ");
Serial.print(pin); // Display the number of the vPin
Serial.println(" is pressed");
} else {
// Do something, or nothing, when button is OFF
}
}
so if you had different code that ran for V200, V201, V202 then you’d need to use a series of ‘if’ statements, or a Select Case statement.
Pete.