BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Different notification messages

I need to have several notification messages.
add another message with pin “D2”
can you help me ?
questo è il codice
#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(“Citofono Squilla”);
Blynk.notify(“Alert : Messaggio 1!”);
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();
}

@Vincenzo please edit your post to add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

forgive me but no I can change it I reply below with the change?

Click the pencil icon at the bottom of your first post to edit it.

Pete.