doing something every X amount of time
Obnepec
Posts: 20
All,
I would like to do something every X amount of time (say 10 seconds although it doesn't have to be exactly 10 seconds) however I have a PWM output that I need to keep up so I don't think I can do a sleep or wait for X amount of time.
So basically lets say I want to run subroutine DoStuff once every 10 seconds but I also need to keep updating the PWM subroutine. How would you do it?
If that is not very clear just let me know and I will try to rephrase.
I would like to do something every X amount of time (say 10 seconds although it doesn't have to be exactly 10 seconds) however I have a PWM output that I need to keep up so I don't think I can do a sleep or wait for X amount of time.
So basically lets say I want to run subroutine DoStuff once every 10 seconds but I also need to keep updating the PWM subroutine. How would you do it?
If that is not very clear just let me know and I will try to rephrase.
Comments