Modify watchdog C code.

Job ID: 33924509

Budget: $99 – $100 USD

I have a circuit based on an attiny that power cycles an external circuit when an input is held high for 1 second or more, and then goes low again. I'm using the code linked below from github. I would like it modified so that instead of power cycling when the state change is detected, I want it to power cycle when no state change is detected. In other words, I want it to be more of a watchdog that cycles the power if it does not get pet instead of just a reboot circut that cycles power when it is told to. The rest of the code should continue to work the same i.e. don't powercycle more than once every hour. I can easily test the code here. The amount of time to wait for a "pet" should be a #define at the top of the code.

https://github.com/nsayer/reboot_o_matic/blob/master/rebooter.c