Just quickly, need to go, look at the libraries section, user contributed and you'll find some there.
I use TimerOne, it is simple to use, basically you attach a function to the interrupt.
You set the interrupt to operate at a specified rate.
Then in that function, you do you pid stuff, remembering that you will need to have some global variables outside of that function to hold some of the pid calcs.
I don't know why you only want the flap to move once every 60 seconds, am I understanding that part right?
Why not allow it to freely operate when it needs, that way the pid will work best.
If you stop the output, that is the flap from moving then the pid will do a thing called 'wind up' because it is not seeing a change in the pv, say temperature.
Then when you do enable the output it will most likely either bang open or bang closed, no fine control there at all.
You do want fine control don't you, say yes ![]()
Ok, later all, 12:30am here zzzz...
Paul