Wifi controlled car, arduino freezes, how to fix

On e again, you’re not listening to the answers you’re being given.
But to answer your question, the 10 seconds comes from the BLYNK_HEARTBEAT setting, which defaults to 10 seconds. You can change it by adding this line to your sketch…

#define BLYNK_HEARTBEAT xx // replace xx with the time in seconds.

But, as I said earlier this I st the solution…

Pete.

Maybe I’m doing something wrong, but I added this:

#define BLYNK_HEARTBEAT 5

But 10 seconds remained.
I have also changed in Blynkconfig.h file but no results.

I beg you, I need it very much, pleeees :pray:

Maybe 10 seconds is the minimum, I’ve never seen a situation where people are trying to go for a longer timeout.

You don’t need it at all, if you follow the advice that’s been given.

Pete.

Ok, but if i write

#define BLYNK_HEARTBEAT 20

Also, no results.

10 seconds don’t change :thinking:

Are you placing that command before all other Blynk commands in your code?

Yes

OK… then either pursue this direction of modifying Blynk’s essential way of working (probably best with a simple test sketch, timers, etc.), or just fix that which sounds like the real issue… reign in your motors, and/or fix your WiFi :slight_smile:

Ok, if you are all talking that my code is too big, I want to ask you some advices, how to reduce it.

I would like to control my car with joystick with minimal delay(if it possible).

And use my sonar sensors also with minimal delay (olso if it possible):grin:

I think that what @Gunner was saying is that basically you have two options:

Option 1
Ignore the advice about fixing the underlying issues in your code, and instead are focus on trying to change the way that Blynk works to get around your coding issues.

Option 2
Listen to the advice you’re being given and fix your code problems.

If you’re going for option 1 then these experiments would be best conducted with a simplified sketch, so that you can best observe the impact of your ‘hacks’ of Blynk’s underlying functionality.

Either way, I’m stepping back from this debate, as you clearly don’t seem interested in the advice that I’ve provided.

Good luck!

Pete.

1 Like

Since I’m not very good at hacks, I’ll choose option 2. I find it more convenient.

Thanks for the support. If I will have other questions, can I ask them?:smiley:

Feel free to ask as many questions as you like, although my advice would be not to ask questions if you aren’t going to listen to the advice that forum members provide in response.

Pete.

2 Likes