An easy one for those with experience, which is not me yet.
Currently my project connects to the Blynk Server at power up & sends a notification after 7 minutes and every 7 minutes after that.
Instead to save resources, I want it to connect to the Server and send a message only after first 10 minutes has elapsed, then on loop every 7 minutes after.
Despite the explanation of how to correctly format code in the text that appears when you create a new topic, and being asked by @JustBertC to edit your post to correct the issue, you haven’t added the correct formatting takes to allow your code to display correctly.
As a result I’ve removed your unformatted code.
Please edit your initial post to add-in your correctly formatted code. The code must have triple backticks at the beginning and and end. Triple backticks look like this:
```
I hope someone may be able to assist with my project.
To save on resources, I want to have a delay of 10 minutes before connecting to the Blynk Server after my ESP8266 is powered up.
(ie. I only want to connect to Blynk Server when it will need to notify. If the device powers up then powers down within first 10 minutes there is no need to connect to the Blynk Server at all.)
Here’s what I have so far:
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "***************************";
// WiFi credentials.
char ssid[] = "xxxxxx";
char pass[] = "xxxxxxxxxxxxxxx";
void setup()
{
Serial.begin(74880);
"wait ten minutes, then connect to Blynk Server "
Blynk.begin(auth, ssid, pass); //connect to Blynk Server
"do something here"
}
void loop(){
Blynk.run();
}
This is basically the same question that you asked 3 weeks ago, so I’ve merged the two topics.
Maybe it would help if you explained what resources you think you’ll be saving by taking this approach. It would also help if you gave more information about what this device does, what sort of environment it will be operating in.