Blynk not receiving my data i dont know what to do please helpp!

[Unformatted code removed by moderator]

I uploaded the code to my esp8266 using Arduino , Blynk says my project is online but its not recieving data,this is my first project im doing it for school and I’m really struggling

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

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

Sorry for the late reply , i figure it out it was the an issue with the wires but now im struggling with the notifications
Its not sending notifications
Please helpp

#define BLYNK_TEMPLATE_ID "----"
#define BLYNK_TEMPLATE_NAME "ARD"
#define BLYNK_AUTH_TOKEN "---------------------------"
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
 
/* WiFi credentials */
char ssid[] = "----";
char pass[] = "------";
 
BlynkTimer timer;
 
int mq135 = A0; // smoke sensor is connected with the analog pin A0 
int data = 0; 
void setup() 
{
  Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
timer.setInterval(1000L, getSendData); // new data will be updated every 1 sec 
}
 
void loop() 
{
  Blynk.run();        // run Blynk magic
  timer.run();        // run timer every second
}
 
/***************************************************
 * Send Sensor data to Blynk
 **************************************************/
void getSendData()
{
data = analogRead(mq135); 
  Blynk.virtualWrite(V0, data); //
 
{

   if (data >250){
    Blynk.logEvent("Warning!", "Trigger Detected!,") ;
}
   }
 
}


I tried to follow the posts you answered in the past but it didn’t do anything this is the only thing i couldn’t do
it says server disconnected, but the device and laptop are both on the same network and the device is connected via wire
any help is appreciated
thank you
M

”Warning!” Is not a valid Blynk Event Code, it looks more like an Event Name.

You also have a big problem with the logic around your notification code. Your getSendData function is called once every second, and if the reading from your sensor is >250 for 100 seconds you will have logged 100 events, which is your 24 hour maximum.

Id suggest that you read this (the web console layout has changed slightly since it was written, but the principals are the same)…

Pete.

1 Like

thank you so much it worked

1 Like