please help me to add some buzzer to my coding using nodemcu esp8266

please i need you guys to help me to add buzzer on coding. i was use nodemcu esp8266 as my microcontroller and flame sensor as my input and the buzzer as a output. went the flame get 1 or high and the buzzer also high, responding to the flame sensor

this is coding. can some of u guys can help me to a add the buzzer

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth = “”; //Auth code sent via Email
char ssid = “”; //Wifi name
char pass = “”; //Wifi Password
int flag=0;
void notifyOnFire()
{
int isButtonPressed = digitalRead(D1);
if (isButtonPressed==1 && flag==0) {
Serial.println(“Fire in the House”);
Blynk.notify(“Alert : Fire in the House”);
flag=1;

}
else if (isButtonPressed==0)
{
flag=0;
}
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(D1,INPUT_PULLUP);
timer.setInterval(1000L,notifyOnFire);
}
void loop()
{
Blynk.run();
timer.run();
}

We tend to frown on writing code for people here. However, we are more than happy to help you see your goal.

I will make an assumption that you are using a Piezo buzzer. If so, this link will help you.

yes i using piezo buzzer, but i dont no how to add the buzzer to my coding because iam using nodemcu esp8266, because i am beginner

afiqsharul:
yes i using piezo buzzer, but i dont no how to add the buzzer to my coding because iam using nodemcu esp8266, because i am beginner

Are you using the Arduino ID to program the device? If so, my link above gives clear understanding on how to do this. Even if not using the Arduino IDE, you should be able to port this code.

Here is one more link NodeMCU Peizo Buzzer on Arduino IDE - Robo India || Tutorials || Learn Arduino || Robotics

yes iam used arduino ide, thanks for the help