I am trying to connect my Arduino Nano to Blynk server using sim800. But in Arduino serial monitor it shows this message and it does not exit Blynk.begin(); command to continue executing commands and shows online device in software. I have attached the images below, please help me.
TinyGSM lib version : 0.12.0
Blynk lib version : 1.3.2
@Mostafa78 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.
I would also suggest that you replace the screenshot of your serial monitor output with the copied/pasted text from your serial monitor, once again with triple backticks at the beginning and end.
Your Blynk account is linked to one server, in your case it appears to be Fra1 which is located in Frankfurt.
You can’t change that, the only way would be to create a new Blynk account and try to force that to be on the Bangalore server Bir1.
Doing that would give you a “new style” Blynk free account, which is limited to 30,000 messages per month.
Your current code attempts to send a reading every 10 seconds, which would use-up around 8,640 messages per day, so the 30,000 message limit would be fully used-up after less than 3.5 days.
So if it is connected, why doesn’t it exit the blynk.begin command to execute the rest of the program’s commands?
My problem is exactly this: this blynk.begin command keeps repeating.
From the limited information you’ve posted, the device is sometimes connecting to the Blynk server and the void loop is executing in those situations, but it is disconnecting before the BlynkTimer your sendFloatData function is called.
You can prove this by placing a Serial.print command in your void loop.
Turning-on timestamps in your void loop would help you (and others) to understand the timings better.
Unfortunately, even with the timer section removed, the program remains at the blynk.begin(); command and does not exit.
Is there another command I can use instead of blynk.begin(); so that it exits the command once it connects and runs the rest of the commands? I saw somewhere that blynk.config(); commands were used. If possible, please give me an example of the inputs to this command.
I wasn’t suggesting that you “remove the timer section”.
Have you done what I suggested to verify that when you see a ping time in your serial monitor the void loop is executing, and enabling timestamps?
Yes, you could use Blynk.config(), but the only way that will help is to display readings in the serial monitor even if the device can’t connect to Blynk.
Here’s an example of using Blynk.config()…
But you’d need to change the default connection timeout, and prevent Blynk.run() from executing if Blynk.connected() is false. An example and discussion is here….