|
Re: Spike Relay code failing
I don't have a robot to load your code on right now......but it looks fine.
This sounds like an electrical/wiring issue. At first thought, it seems like it might be drawing too much current and lowering the voltage of the battery to the point where the cRio is losing it's minimum voltage to operate.
There's of course of ton of things you could do to try and troubleshoot this.
1. Try changing your code to run only two motors instead of four. Use one on the left and one on the right like tank drive. Re-create the situation that causes it to stop and see if it persists.
2. Instead of changing the code, try unhooking the PWM cables to one jaguar at a time. Create the same situation that causes it to stop for each unhooked PWM cable.
3. Enable the relay code ( code it so a joystick button press sets it to kForward, so its off when it first starts until you press the button) , plug in all jaguars, but disconnect the spike from the digital sidecar. Run the robot and press the button you assigned in the code to turn on the spike relay (pretending its plugged in, even though it isn't). If it still jerks and dies, then it's code related. If not, you've got a wiring issue.
I'm not too sure that the relay problem is directly related to the motor issue.
Let me know if any of that gets you some results. I'll think of some more things to do for troubleshooting. If you could, PM me a picture of your control system including all components.
-Sean
__________________
I'm a mentor looking for a home in Southern California! I know Java, C++, electrical and mechanical.
Need Java or C++ help? Send me a PM!
|