I'd need a true reset. At the current state of my program, adding a label to the very top followed by Clear, would work, but later on i may need a true reset. Doing the same as you'd get from pressing the reset button, this is why i'm not opposed to using an external device. A relay would work, but i want to avoid that due to their size.
Making the button more accessible is good thinking, but it's when having the bot out of arms reach, a button wont cut it.
I'd want a way to reset it remotely.
IE i send a code-word to the bot, and should the bot receive this codeword it'll initiate the reset.
Quite literally
Controller
Code:
;Normal programming here
if (in0 = 0) then ;button on p0 pressed down on controller
Hserout [dec 911]
endif
;normal programming after this.
bot
Code:
Hserin [dec OMG]
if (OMG = 911) then
softreset
endif
So if i send 911 to the bot, it'll do a soft reset. If you can make this happen by using a command that triggers the watchdog timer that's fine.
I'm just getting confused with all the discussion of the watchdog stuff. I still don't know exactly what i'd have to do to initiate the reset using a watchdogtimer.
Keep in mind, i'm not very good at programming, but my if/then/else programming is fine.
I just want a way to reset the chip incase i overextend a servo again, or if the programming has an unexpected reaction. I'd want to be able to reset it quickly, FROM the controller. I may even go as far as to use a dedicated micro controller, to work as a safety.
IE the secondary MCU and the main MCU would both read the serial input from the wireless device, but the secondary would only react to special commands, that the main MCU would simply ignore. Daisy Chain MCU's.
Infact this may be the safer route. Incase the main MCU completely freezes up or goes into an infinite loop. I'd still need some sort of electronic switch. I'd use a transistor if it would work.
Example of usefulness.
You guys used to watch that show robot arena or what ever right? Where people would make big remote robots to destroy other robots?
What if your bot freezes up there, or goes into a loop or gets stuck. Wouldn't you want a way to reset it remotely so your bot doesn't get hammered by a bot nicknamed: The Delivery Boy.