Basic implementation of watchdog

Dependencies:   ros_lib_kinetic

main.cpp

Committer:
t1jain
Date:
2019-06-25
Revision:
1:38b385f34687
Parent:
0:975e02a70882

File content as of revision 1:38b385f34687:

#include "mbed.h"
#include <ros.h>
#include <nav_msgs/Odometry.h>  //contains both the twist and pose
#include "Watchdog.h"

int i = 1;

Serial pc(USBTX, USBRX, 57600);     //Serial Monitor

int main(void)
{
    Watchdog dog;
    dog.Configure(1);
    pc.printf("I'm resetting!\n", dog.WatchdogCausedReset());
    
    while(i++)
    {
    pc.printf("Hello! I'm working! Iteration: %d \n", i);
    wait(0.9);
    
    if (i == 10) {
        wait(0.6);
    }
    
    
    dog.Service();
    //return 0;
    }
}