I'm not sure if you're trying to stop the robot using software (as in, if we run into something stop) or if you mean that you want to be able to kill the robot in mid-stride because you can tell it's just about to rip its arm off.
For the first thing, you just have to set the variables pwm
XX and pwm
XX to 127 in your code, where the two
XX is where your motors are hooked up.
For the other option, which only works when you're on your practice field, you build a dongle, which is basically just a few stiches which connect/disconnect a few pins on the competition port on the operator interface. I'm not sure right now exactly where those are, but there is lots about them here. Do a search.
