Reset Command Available?
JBWolf
Posts: 405
Hello,
I was wondering if there is a spin command to reset the propeller? I'd like to accomplish same effect as pushing the reset button or powercycling.
I'm hoping for an easy way to make my program restart if a combination of input buttons are held down for a period of time.
Thanx,
J
I was wondering if there is a spin command to reset the propeller? I'd like to accomplish same effect as pushing the reset button or powercycling.
I'm hoping for an easy way to make my program restart if a combination of input buttons are held down for a period of time.
Thanx,
J
Comments
Looks like syntax is used just like QUIT, by itself correct?
for example:
if ina[button] == 1
reboot
That said, your code above is a tad dangerous; a bit of noise on the board could cause the input to read as "1" and reset the program when you don't mean it to. You might want to add a simple debouce loop.