How to get servo to rest at 90* with Blynk

Hey guys, my code is working fine with my Blynk app. It turns the light switch on and off like it should with my 3D printed mount to my light switch with a sg90 servo. The only problem with using the Blynk app is, to my knowledge, that i can only have one button prgrammed to a single pin at a time.

Originally i thought i could have 2 buttons one that turned the servo to 0* from 90* and then went back to 90* and then another that turned the servo from 90* to 180* and back to 90*.

The reason the servo needs to rest at the 90* position after turning the light on and off is because that allows manual operation of the light switch so you dont have to open the app up every time you walk into the room. Originally i had this working in my web based app.. see below code labeled 1.2 but i cant seem to get that code to mesh with my code for the blynk app.

1.2

void moveServoToOnPosition(void){
  for(pos = 90; pos<=170; pos+=1)     // goes from 90 degrees to 170 degrees
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 170; pos>=90; pos-=1)     // goes from 170 degrees to 90 degrees
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
    Serial.println(pos);
  } 
}

void moveServoToOffPosition(void){
  for(pos = 90; pos>=0; pos-=1)     // goes from 90 degrees to 0 degrees
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
    Serial.println(pos);
  } 
 for(pos = 0; pos<=90; pos+=1)     // goes from 0 degrees to 90 degrees
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
    Serial.println(pos);
  } 
}

void turnSwitchOnCb(){
  moveServoToOnPosition();
  server.send(200, "text/html", "ON!");
}

void turnSwitchOffCb(){
  moveServoToOffPosition();
  server.send(200, "text/html", "OFF!");
}
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>

char auth[] = "09192f7ec5cd47fdb8ea5cae59f51ede";
char ssid[] = ""; //hidden for forum purposes
char pass[] = "";  //hidden for forum purposes

Servo servo;

BLYNK_WRITE(V3) {
servo.write(param.asInt());
}

void setup() {

Serial.begin(115200);
Blynk.begin(auth, ssid, pass);

servo.attach(2); // 2 means D4 pin of ESP8266

}

void loop(){

Blynk.run();

}

mbasile:
The only problem with using the Blynk app is, to my knowledge, that i can only have one button prgrammed to a single pin at a time.

read about [url=https://docs.blynk.cc/#blynk-firmware-blynktimer-blynk_write_default]BLYNK_WRITE_DEFAULT[/url]() which redefines the handler for all pins that are not covered by custom BLYNK_WRITE functions

here is a small code demonstrating how to capture virtual pins

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

int virtualPins[] = {V0, V1, V2, V3, V4, V5};
const byte nbVirtualPins = sizeof(virtualPins) / sizeof(virtualPins[0]);


// get your Auth Token in the Blynk App,  Go to the Project Settings (nut icon).
char auth[] = "xxxxx";

// Your WiFi credentials.
const char ssid[] = "xxxx";
const char pass[] = "xxxx"; // Set password to "" for open networks.


BLYNK_WRITE_DEFAULT()
{
  int virtualPinNb = request.pin; // which pin was it?
  int value = param.asInt(); // get the value as a number 
  Serial.print(F("Virtual Pin "));
  Serial.print(virtualPinNb);  // Display the number of the vPin
  Serial.print(F(" value= "));
  Serial.println(value); // Display the value of the vPin
}


void setup() {
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);
  for (byte i = 0; i < nbVirtualPins; i++) {
    Blynk.virtualWrite(virtualPins[i], 0);
    delay(10); // do not overload the server
  }
}

void loop() {
  Blynk.run();
}