View Single Post
  #1   Spotlight this post!  
Unread 25-01-2011, 15:42
aya94 aya94 is offline
Registered User
no team
 
Join Date: Jan 2010
Location: ISRAEL
Posts: 17
aya94 is an unknown quantity at this point
windriver help!!

Hi:
I am part of team 1946 , and we are now writing our robot cod for season 2011 , our programming language is C++, and we kind of have a little problem ..
We finished the mecanum wheels programming and they worked perfectly, now we are about to program the pneumatic hand. Basically the hand is a gripper,that opens when pressing button (2) on the joystick and closes when pressing button (3) ,we wrote a cod for that but it keeps giving us errors.
It will be great if you helped us to figure out what is the problem exactly with our code …
here is our code (this is a part of the entire code ,we defind (solenoid gripper_o) and solenoid gripper_c)


bool gripper_cTrig = Leftstick.GetRawButton(3);
bool gripper_oTrig = Leftstick.GetRawButton(2);

if (gripper_oTrig)
{
gripper_o.Set(true);
gripper_c.Set(false);
}
else if(gripper_cTrig)
{

gripper_o.Set(false);
gripper_c.Set(true);
}
else
{
gripper_o.Set(false);
gripper_c.Set(false);
}
Reply With Quote