Doctor Gandalf
26-02-2013, 15:48
Hi guys,
I'm trying to program a new arm for my FTC team (3116) to use at states. It uses three servos (one at the bottom, one in the middle, and one as a wrist), which I set up to individual buttons; each has two (up and down).
When I tested the program, it repeatedly switches up which servo goes to which button.
I tried to troubleshoot, first by replacing the NXT (three different ones with the same problem) and the servo controller (two different ones, no fix). Then, I tried to use a new program. Rather than making two case structures nestled in each other (like the auto generated code), I unpacked the controller button cluster, sending each button to an individual if else test.
This worked better, but it wouldn't store the value of the buttons (meaning the servos would constantly move between the positions) - and the NXT wouldn't let me make a Boolean memory unit to store the data. It is important to note that the servos didn't respond to the wrong signal at that point.
Is there anything I missed? It seems to be a problem in the coding, but I'm not sure what needs to be fixed. Is there a better way to program the servos than what I tried?
Thanks for the help!
I'm trying to program a new arm for my FTC team (3116) to use at states. It uses three servos (one at the bottom, one in the middle, and one as a wrist), which I set up to individual buttons; each has two (up and down).
When I tested the program, it repeatedly switches up which servo goes to which button.
I tried to troubleshoot, first by replacing the NXT (three different ones with the same problem) and the servo controller (two different ones, no fix). Then, I tried to use a new program. Rather than making two case structures nestled in each other (like the auto generated code), I unpacked the controller button cluster, sending each button to an individual if else test.
This worked better, but it wouldn't store the value of the buttons (meaning the servos would constantly move between the positions) - and the NXT wouldn't let me make a Boolean memory unit to store the data. It is important to note that the servos didn't respond to the wrong signal at that point.
Is there anything I missed? It seems to be a problem in the coding, but I'm not sure what needs to be fixed. Is there a better way to program the servos than what I tried?
Thanks for the help!