Buzzer+nodemcu+blynk

I need to conect a 3 pin buzzer to nodeMCU but it makes sounds all the time and not with the blynk button as it is supposed to, what should I change?
Thanks

My code:



#define BLYNK_PRINT Serial
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] ="fc8011eb784b419684be7ca1f5918852";

//WiFi credentials.
char ssid[] = "******";
char pass[] = "******";

WidgetMap myMap(V0);

void setup()
{
//Debug console
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  
//BUZZER
 pinMode(D3,OUTPUT);
//

//MAP
  int index = 1;
  float lat = 51.5074;
  float lon = 0.1278;
  myMap.location(index, lat, lon, "value");
 //
}

void loop()
{
  Blynk.run();
  
  //BUZZER
      digitalWrite(D3,HIGH);// Buzz sound
    delay(1);//delay 1ms
      digitalWrite(D3,LOW);// silent
    delay(1);//delay 1ms
  //
}

Please edit your post (using the pencil icon at the bottom of the post) and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

Now that you’ve fixed the formatting, have a read of this:

Pete.

Thanks.
I still dont get it.
I understand that I have to clean my void loop but if I remove the buzzer lines from there, it doesn’t work at all.
How can I connect the buzzer in a way that works but is controlled only by Blynk?
Thanks again

The info button will give you some clues.

In that case, you aren’t using a timer to call a function that contains your buzzer code.

Try re-reading the document I linked until you do “get it”.

Pete.