Having Difficulty in BLYNK NOTIFICATION

I am running BLYNK APP in IOS (iphone 6S), whole code is working properly just got stuck in notification.
i need notification when [pin 8 goes high]. it is working even sending notification but goes to restart & reconfigure whole code again…

i am using this comand {Blynk.notify(“OFF”);}
but i am using this in void loop that’s why its going to restart after some time again & again…
i don’t know how to use this command out of void loop. please guide me.

A definite no, no.

See PUSH_DATA for an example of how to call functions at intervals.

can you please give me some code line ?

Sure, loads of line of code at https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData

Test PUSH_DATA until you fully understand it and then move on with your project.

Blynk also has this obscure little section, all covered in dust, called Documentation.


this is the code i am using in my void loop, all set even working properly. i just need notification, at “ELSE Condition”,
have a look please

void loop()
int raw = analogRead(A0);

float voltage = (float) raw * 5.0 / 1024.0; // voltage at the pin of the Arduino
float pressure_kPa = (voltage - 0.5) / 4.0 * 1200.0; // voltage to pressure
float pressure_psi = pressure_kPa * 0.14503773773020923; // kPa to psiA
if (raw > threshold) {
digitalWrite(ledPin, LOW);

} else {
digitalWrite(ledPin, HIGH);


No it is NOT working properly… you are trying to run all those commands hundreds of times a second… Just wrong :confounded:

Maximum 2 lines of code in loop() until you are an experienced Blynker. See PUSH_DATA, see PUSH_DATA, see PUSH_DATA, see PUSH_DATA.


ok :frowning: Thank you so much :slight_smile: light_smile:

Can you please share me some code example which is sending notification on some condition ?
i am using arduino UNO & CC3000

@Shariq_Khan Please keep questions like this in the public forum, not in messaging. Thank you.

We have already provided links and directions to the exact code and documentation you need… but it appears you haven’t even clicked on any of the links.

Will you at least click on this one… it is the code you are asking for.


There are more examples where this came from… and please read the documentation… they get lonely.

no, i take care of that… reading almost every week or so :slight_smile:


Thank you so much, the code you share the link with me worked. :slight_smile:
in this case i am receiving notification, when i bush the button on BLynk APP, i want notification, when sensor data from (analog pin 0) go down below threshold, Can you please suggest some lines of code or the theme that how can i achieve it.