stephenthe1
15-02-2006, 15:46
hi, my team is having some problems using pneumatics, and we can't seem to figure out what the problem is. The problem is that we can only shift or fire the pistons in one direction. here is my code:
if (p1_sw_trig == 1)
{
relay1_fwd = 1;
relay1_rev = 0;
}
else if (p1_sw_top == 1)
{
relay1_fwd = 0;
relay1_rev = 1;
}
else
{
}
that's all there is to the code for shifting. The thing is, if we start the piston in the retracted position, we can click the trigger on port one to fire it. however pressing port one to return it to the old position won't do anything. we're also having this one-directional problem with another piston used in our launching mechanism. Pressing both buttons on the joystick one cause the bot to make a clicking sound on one of the elctronic devices, but nothing happens. Do you know anything about what could cause this? Most of our problems arise from my programming errors hehe; but it doesn't seem feasible that is the problem in this case. could it be a wiring problem we're not aware of? thanks a bunch
-Team Lugnut (1008)
if (p1_sw_trig == 1)
{
relay1_fwd = 1;
relay1_rev = 0;
}
else if (p1_sw_top == 1)
{
relay1_fwd = 0;
relay1_rev = 1;
}
else
{
}
that's all there is to the code for shifting. The thing is, if we start the piston in the retracted position, we can click the trigger on port one to fire it. however pressing port one to return it to the old position won't do anything. we're also having this one-directional problem with another piston used in our launching mechanism. Pressing both buttons on the joystick one cause the bot to make a clicking sound on one of the elctronic devices, but nothing happens. Do you know anything about what could cause this? Most of our problems arise from my programming errors hehe; but it doesn't seem feasible that is the problem in this case. could it be a wiring problem we're not aware of? thanks a bunch
-Team Lugnut (1008)