Does this code work
I have not tested Daves code, but my guess would be yes. I haven't seen anything he's posted yet not work as advertised...;o}

I would set WDT to ON for this one though.

If you have questions, I'm sure Dave will chime-in here at some point. He offers a lot of excellent help here when he has the time.