The watchdog timer is a Meadow.OS feature that enables the device to be reset if an application becomes unresponsive.

This increases solution reliability by making sure that if the application fails or crashes, then the device is rebooted and the application can start operating again.


To use the watchdog timer, you first enable it, passing the a countdown timeout (in milliseconds) which specifies how long you have to reset the countdown before the device is reset.

Then, prior to the countdown elapsing, you must reset the countdown, to prevent the device from reseting.

Enabling the Watchdog Timer

// enable the watchdog for 10s
// start the thread that resets the counter

Reseting the Timer

void StartPettingWatchdog(int pettingInterval)
    // just for good measure, let's reset the watchdog to begin with
    // start a thread that pets it
    Thread t = new Thread(() => {
        while (true) {
            Console.WriteLine("Petting watchdog.");


These docs are open source. If you find an issue, please file a bug, or send us a pull request. And if you want to contribute, we'd love that too!