Code not working with Blynk

That’s because you’ve not listened to the advice you’ve been given about the need to give the Blynk library the processor time it needs.
But, people will only give you the same information so many times. After that, if you choose not to take that advice then we tend to let you work it out for for yourself the hard way.

Pete.

I have seen many videos and writeups about blynk timer but there’s something that is missing… It isn’t working in my case. I have also raised this issue earlier… And I don’t think millis is an issue here…

Yes, and you’ve received answers then gone quiet.

There isn’t a fundamental issue with using millis comparisons in Blynk sketches per se - I do it from time to time, it’s the way that you’ve chosen to do this in a very clunky fashion and using wile statements. From my point of view, while statements are best avoided when using Blynk, unless you really know what you’re doing.

Anyway, you clearly aren’t interested in my advice, so I’ll leave you to it.

Pete.

Hello Pete,

I have received my esp wifi module today. But I’m unable to connect it to my mega… Is there any tutorial that can guide me setting up wifi for mega? After that I will start debugging…

Assuming that this means an ESP-01 then there are quite a few different tutorials on the forum. It’s actually pretty easy, once you work out the wiring. Just make sure you don’t connect it to the Tx/Rx pins on your Mega, as these are Serial0, which you’ll use for debugging. Use one of the other hardware serial ports.

Pete.