I cannot change the state of the digital pin via the virtual pin

Hi, I can’t change the state of digital pin D5 via virtual pin V5, I would like pressing the V5 on blynk to change it
state of button D5 to which a button is connected, what am I wrong?
Thank you.

byte Pulsante100 = 0 ; 

void setup() {
  pinMode (D5,INPUT_PULLUP);//Pulsante100%
  Pulsante100 = digitalRead(D5);  
  if(param.asInt()==0) {
  digitalWrite(Pulsante100, LOW); }
  else {
  digitalWrite(Pulsante100, HIGH); }

void valoriEEPROM (){
if (Pulsante100 == LOW) {
  valoremax =  analogRead (A0);// 
  EEPROM.put(100,valoremax );
  EEPROM.commit() ;
  Blynk.logEvent ("valore_massimo_memorizzato");
  Serial.println (valoremax);
  delay (1000);}

What you’re doing here is reading the value of pin D5 (GPIO14) and assigning the resulting value to the Pulsant100 variable.
Because D5 is a digital pin, the result stored in Pulsant100 will be a 0 or a 1.

You are then saying digitalWrite(Pulsante100, LOW) or digitalWrite(Pulsante100, HIGH)

As Pulsant100 is a 0 or a 1, you are actually trying to make the GPIO0 (D3) or GPIO1(The Tx pin) HIGH or LOW.
As you don’t have PinMode statements for GPIO0 or 1 then these command probably have no effect.

If you did this…

  Pulsante100 = digitalRead(D5);  
  if(param.asInt()==0) {
  digitalWrite(D5, LOW); }
  else {
  digitalWrite(D5, HIGH); }

You would at least be writing to the correct digital pin, but as you are reading the value of D5 I assume that you actually want to use the V5 virtual pin to toggle the state of the D5 pin. If that’s the case then you should use the logical NOT operator (the exclamation mark) to write the logical opposite of the current D5 state, like this…

  Pulsante100 = digitalRead(D5);  
  digitalWrite(D5, !Pulsante100);