How can I convert digital pin to virtual pin

My motor driver card is connected to Blynk In digital gp5 pin. how to connect to virtual pin(V0) "


BLYNK_WRITE(V0) {
  if (param.asInt()) {
    if (CountdownRemain) { // check if there is a time set or not
      timer.enable(CountdownTimer);
      Blynk.virtualWrite(V9, CountdownRemain); // Timer LED status light on
    } else {
      Blynk.virtualWrite(V0, LOW); // if CountdownRemain is set to 0, then dont start hte timer.
      // Blynk.virtualWrite(V4, "COUNTDOWN TIME NOT SET"); // if CountdownRemain is set to 0, then tell the user
    }
  } else {
    timer.disable(CountdownTimer);
    Blynk.virtualWrite(V9, 0); // Timer LED status light off
  }

   if (pinValue == 1) {
    digitalWrite(LED, HIGH); // Turn LED on.
  } else {
    digitalWrite(LED, LOW); // Turn LED off.
 }

}

I don’t really understand the question. You already have something attached to V0. How does this fit in to what you are trying to achieve?

Pete.

When i press vo pin the gp5 pin should work. But gp5 pin digital pin

Sorry, you’re going to have to explain in more detail than that.

Pete.

I have two pin values
first pin:V0(virtual pin)
second pin:gp5(digital pin)
I start and stop the water engine with the gp5 pin. I start and stop time with V0 pin . my water motor pin works only with gp5. When I press the V0 button I want the gp5 button to work

Mixing digital and virtual pins is going to be a problem.

You should change your start/stop button to a virtual pin with a corresponding BLYNK_WRITE callback function which contains a digitalWrite(5,value) command where the value parameter comes from the param.asInt() command.

You should also have a digitalWrite(5,value) command at the appropriate place in your BLYNK_WRITE(V0) callback function to stop the pump when the timer ends, and a Blynk.virtualWrite(vPin,value) command to set the newly converted virtual button widget to the matching status.

Pete.

Thank you for letting me know. Can you elaborate a little more because I’m new, I’ve been trying for hours and haven’t gotten any results

What have you tried?

Pete.