Is there a way to reset the robot controller under program control? (Analogous to the robot reset button)
The only way I know of is to roll your own reset. Essentially, you can trash all your variables (set to zero) by hand, including Scratch Pad Ram if you use it and then using a goto label or a run 0 command.
This could work for you if you really need to.
If you REALLY need to have a robot reset under program control, you may just wire up a bunch of motors to stall eachother, then pull the battery down low enough to reset stuff.
I don’t know what voltage the controller kicks out, but the radios die at 8 volts.
Hope this helps.
if your software gets so lost/ messed up, that you think you need to reset the controller
then what makes you think you can get that part of the sw right?
isnt that like asking a crazy person if he is OK?!
I am using our EduBot to do some learning while our “big” robot is in quarantine. So I don’t know for sure if this issue applies to the full size RC.
I notice that when I power up, and also when I return to bank 0 by “RUN 0” after executing in another bank, I go through the top initialization section of the bank 0 program twice. Evidently, something that gets executed in the I/O setup causes a processor reset. It also zeros out the scratchpad, so what I have put there to communicate a bank 1 result back to bank 0 has been lost.
Can someone clarify this for me, or point me to a source of information?
Mount a small (3/4" diameter by 1/2" stroke) pneumatic piston over the “Reset” button on the RC. Connect it to a single solenoid valve, which is plumbed to the piston so the piston rod is retracted when the solenoid is not powered (off). When you need to reset the controller (I am assuming that for some reason you want to reset the RC while you still can command it - see KenWittlief post above!), energize the solenoid, which fires the piston, which punches the Rest button, which resets the controller, which drops power, which cuts power to the solenoid, which retracts the piston rod away from the Reset button, which allows the RC to reset (… and the knee bone’s connected to the ankle bone, and the ankle bone’s connected to the … la la la de da…).
A kludge, but it should work.
You can do the same thing with a servo
#1 mount a servo such that 127 PWM value puts the arm just above the reset button on the RC with XXX PWM value pushing the reset button
#2 spring load the arm so that it returns to to the position of 127 when power is cut
#3 when you wish to reset the RC, command XXX to the corresponding PWM output
This has the benefit of not needed a valve, spike and a pneumantic cylinder. It also does not require the associated pumps, etc. The final benefit is that you don’t have to worry about an air cylinder punching your RC to death. The servos are load limited by design.
As to why you want to do this, I can think of one possible idea.
Suppose you need to have a completely different set of variables given to your Pbasic program during to different operating modes (for example, autonomous and drive controlled?). If you needed more than 26 different variables (total) you are in trouble.
But… with this robot reset via program control you could set a bit in EEPROM prior to requesting a reset. Upon reset, before executing the command that tells the Master CPU which variables you want, you could read the EEPROM value and then request the right set of data from the Master CPU.
I have never actually run into this problem, but if I did, this method would be a way around the limitation of the current system.