I want to run a loop with a delay every time the code in it is called, but whenever I use time.sleep() I can only run one loop and I need more than 1 loop to run at certain time... how can I associate the the time for the loop only and not the rest of the code?
Even though this shouldn't be a problem, that I can see, try putting your variables into the loop if they're not already. I had a simular situation where the loop would only run once then stop, but if I put the variables I used in the loop it worked. If not, then I'm out of idea's. Good luck, though!