Hey Steve! I didn't feel like you were being critical. In fact, I finally got on the ball today and added the watchdog timer to the program to avoid the hanging u-controller. Thank you for the awesome suggestion. Now, if there is some strange thing that makes the micro-controller freeze up, in a half a second the watchdog timer times out and restarts the program. The human will notice that there is a sudden loss of power, and they will have to take their foot off the gas and then just go right back to driving. It shouldn't be a problem, as I've never had the microcontroller hang, but it must happen enough for people to invent a watchdog!
Thanks again, Steve! I haven't been wanting to wade through the documentation to understand how to do the watchdog until now. It turned out to only be 2 new lines of code, but it was like 4 hours of reading and debugging! haha! It's now tested and working in real life! One of the hard things was the fact that the stupid simulator on the computer doesn't restart when the simulated watchdog times out. Makes me mad! I would take that simulated watchdog to the pound.
|