Regular reboot (or watchdog) for Swan

Hi,

I have been using a watchdog timer in my project (card Requests - API Reference - Blues Developers) and it is a simple card.attn request:

      J *req = notecard.newRequest("card.attn");
      JAddStringToObject(req, "mode", "watchdog");
      JAddNumberToObject(req, "seconds", sensorInterval * 5);
      notecard.sendRequest(req);

I also know there are reserved environment variables you can use to restart the host every specified number of hours: Understanding Environment Variables - Blues Developers

You do need to connect the Notecard’s attn pin to the Swan’s EN pin for these to work, though.

I hope this helps!

2 Likes