Go Down

Topic: exception handling? (Read 6371 times) previous topic - next topic

NewLine

Dec 15, 2013, 01:00 pm Last Edit: Dec 15, 2013, 01:26 pm by NewLine Reason: 1
I am used to writing linux (desktop) applications where I use a lot of assertions, etc...
I typically use try-catch-throw features of C++. Most of the times this ends up in a message to the user.

What is a good way for handling exceptions on an Arduino Yun. E.g. suppose you have an application that involves temperature reading and the MCU notices that the sensor doesn't respond or so. What do you do, assuming you have no terminal connected?

- blink an error LED?
- write a log on the SD card?
- reset the system and hope it recovers?
- set all actuators to their "safe state"?
- send the owner a message?
- ...

Just trying to get some inspiration

federicofissore

For a yun installed and forgotten into a case, doing its job, in case of failure I would use any possible means for error reporting.
First send some email/tweet/something to me, then blinking like hell and, if a piezo is available, emit a sound
Things are easier if you have a screen (tft, led matrix...)

NewLine

I think the Yun can restart itself? (reset-mcu) and next reboot Linino. If it is a software fault, this might solve the issue (after the mail, tweet, ...)

Go Up