Dragonsired1:
when using millis function code inside it is skipped every 3-4 seconds.
I don't know what you mean by that?
What is being skipped?
You are using a lot of libraries. Is it possible that some calls to a library take so long that the time for the next interval has passed?
The problem is often in the code that you do not post.
When did the problem emerge during your development of the program? Can you go back to a version that was working faultlessly and then know that it was some of the subsequent code that caused the problem or perhaps made a latent problem visible?
...R